I have a string property
public string XYZ
{
get => // do stuff
set => // do stuff which handles null
}
because I'm hoping it will get called....
But will it really? (EF6.4)
I have a string property
public string XYZ
{
get => // do stuff
set => // do stuff which handles null
}
because I'm hoping it will get called....
But will it really? (EF6.4)
It appears it will. If you implement the property with a backing field it's easy to test this by putting a breakpoint in the setter. EG
And I think it would have to, as EF does not know whether your entities have a non-standard default value for a property. eg you could write
And so the hydration code would need to run the setter to get a correct result.