Hi,
I recently upgraded a project to EF6. As a result, my database now includes columns for automatic read-only properties that are defined in my code-first models' base class.
For example, I have defined a class such as the following and added a corresponding DbSet property to my DbContext class.
The base class is defined as follows:
And now the Foo table in my database has an IsValid column that wasn't generated by EF5.
Is this a bug or is it by design?
If it's by design, then is there a way to globally turn off this new behavior so that I can continue using automatic read-only properties without having to specify NotMapped on each of them?
I've already read the following discussion and it seems like it applies, but I don't know if these changes were actually implemented in EF6:
http://entityframework.codeplex.com/wikipage?title=Design%20Meeting%20Notes%20-%20February%2020%2C%202013
Thanks,
Dave
I recently upgraded a project to EF6. As a result, my database now includes columns for automatic read-only properties that are defined in my code-first models' base class.
For example, I have defined a class such as the following and added a corresponding DbSet property to my DbContext class.
publicclass Foo : Bar { [Key] publicint Id { get; set; } }
publicabstractclass Bar { publicbool IsValid { get; privateset; } }
Is this a bug or is it by design?
If it's by design, then is there a way to globally turn off this new behavior so that I can continue using automatic read-only properties without having to specify NotMapped on each of them?
I've already read the following discussion and it seems like it applies, but I don't know if these changes were actually implemented in EF6:
http://entityframework.codeplex.com/wikipage?title=Design%20Meeting%20Notes%20-%20February%2020%2C%202013
Thanks,
Dave