Vivek30 wrote:
I just now tried marking IsAbstract as false and I could see that now the constructor is public and havent observed any issues so far.
My question is, this entity was always abstract so does .net framework 3.5 and 4.5.1 treats an abstract entity differently.
If the entity is marked abstract, it always is generated with internal constructors. This is for .NET 1.x and .NET 2.x in v2.6's standard templates. I don't know why the constructors weren't internal before, the templates are generating the constructor as internal for abstract entities.
Also by making this entity as non-abstract what could possibly be the consequences(worst case scenario).
Nothing bad, it's however now possible to create an instance of that entity and save it to the DB. If you don't want developers to do that, you should keep marking the entity as abstract. That's the reason why the constructors are internal: the entity is abstract and therefore can't be directly created. The class isn't marked 'abstract' as one can fetch entities of that type as all subtypes are of that type.