Home > Net >  EF6 entity how to get his new navigation attribute?
EF6 entity how to get his new navigation attribute?

Time:10-08

 
The db. The Entity. The Add (Entity);
The SaveChanges ();
Return ToModel (entity);//the Error!

ToModel is query and when the new gm will be mapping entity the ViewModel approach method invoked inside navigation properties, hence null reference...
Tried Entry. Reload, and to Find out, can't fill navigation properties, how should solve?

CodePudding user response:

Put the issue to the Model, and was part of the front end use, take a look at your navigation attribute is write wrong,

CodePudding user response:

Virtual have?
  • Related