Entity Framework (EF) Code First: NotMapped and WCF solved
hi all!!
to all of u that ever tried to put a property in ur class, with the will that the EF wont put it in the DB yet will expose it, and tried to do the right thing using attribute "NotMapped" and it didnt work...
well MS somehow made it that if u put NotMapped then u also lose the serialization part, meaning that its not a "DataMember" anymore.
so there is a solution: add both NotMapped and DataMember.
GL!
to all of u that ever tried to put a property in ur class, with the will that the EF wont put it in the DB yet will expose it, and tried to do the right thing using attribute "NotMapped" and it didnt work...
well MS somehow made it that if u put NotMapped then u also lose the serialization part, meaning that its not a "DataMember" anymore.
so there is a solution: add both NotMapped and DataMember.
GL!
Comments
Post a Comment