Page 1 of 1
Why can't you have a the same property name as the entity that it is in?
Posted: Fri 02 Jan 2015 17:34
by ashlar64
Hello,
I am wondering why LinqConnect doesn't allow a property name of a entity to be the same as a entity's class name?
Or is there a way to allow this?
Re: Why can't you have a the same property name as the entity that it is in?
Posted: Mon 05 Jan 2015 13:38
by MariiaI
Although it is possible to create property with the same name as the class in Visual Basic, it is not a very good practice. For this reason, the C# language does not allow to do it, and many editors, too (such as the standard ADO.NET Entity Data Model Designer). Thus, in order to avoid the problems with sharing models between different projects and to maintain best practices we perform this validation, too.
Re: Why can't you have a the same property name as the entity that it is in?
Posted: Mon 05 Jan 2015 15:26
by ashlar64
Well I totally agree with you....ideally I would like to do that. But when dealing with external code / or equipment sometimes you have to do things certain ways that are not exactly the most ideal ways to do things.
Ok - so it sounds like there is no setting that would allow this.
If not that is fine I will just have to use the custom code I am currently using in that case...
Re: Why can't you have a the same property name as the entity that it is in?
Posted: Tue 06 Jan 2015 06:05
by MariiaI
ashlar64 wrote:Ok - so it sounds like there is no setting that would allow this.
If not that is fine I will just have to use the custom code I am currently using in that case...
Yes, unfortunately, there is no such setting in LinqConnect.
If you have any further questions, feel free to contact us.