You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expression bodied properties fail to populate in db #2318
Entity type has expression bodied (read only) property, e.g.:
public string TitleInRFC1234Format => expression that calculates expected value from other property values
Property is included in model and db schema by default (good)
[UNEXPECTED] Upon SaveChanges() db column value is always null
@MatthewMWR given the property does not have a setter, the expected behavior is for EF to ignore it. I did a simple test using both Beta 4 and the latest nightly build and neither of these included the property in the model/database. Any chance you could share the code where you saw a column created for the property?
Likely explanation is I did something in the builder/fluent layer to force the property creation in the database. Now that I understand expected behavior this thread becomes a dupe of #2319 .
Activity
rowanmiller commentedon Jun 12, 2015
@MatthewMWR given the property does not have a setter, the expected behavior is for EF to ignore it. I did a simple test using both Beta 4 and the latest nightly build and neither of these included the property in the model/database. Any chance you could share the code where you saw a column created for the property?
Here is the code I was using to test it out...
MatthewMWR commentedon Jun 16, 2015
Likely explanation is I did something in the builder/fluent layer to force the property creation in the database. Now that I understand expected behavior this thread becomes a dupe of #2319 .