EntityObject Class Constructors
Posted by: Julia Lerman Blog - Dont Be Iffy...,
on 22 Jan 2009 |
View original | Bookmarked: 0 time(s)
Did you know that the default classes generated by the Entity Framework Designer don't
have class constructors? And that this is great news?
It means that you can create your own class constructors that will always be used
when new entity objects are instantiated. This isn't limited to those times when you
explicitly instantiate an object, but also when objects are being materialized from
data returned by a query.
This is a great place to infer defaults that cannot be defined in the model itself.