Is really does not support, can't try for a long time,,
Will update the entity, I manually one by one the assignment? That is too famous,
CodePudding user response:
Please understand clearly what is webapiCodePudding user response:
Webapi is a data interface, the background data service, there is no page service, there would be no page this stuff, there would be no PageModel, no PageModel, then TryUpdateModelAsync come from, and where to go?Though a lot of people like the webapi and MVC page mixed together to make a project, but the concept is clear, it's just some people do not understand clear
CodePudding user response:
Yes, you got mixed up on the asp.net MVC and webapi,They inherited base class also different, one is apiController, one is the Controller
CodePudding user response:
Implement IValueProvider interface, to get their data can be read front endIf (await this. TryUpdateModelAsync
JsonValueProviderFactory. GetValueProvider (this)))
{
Await the SaveChangesAsync ();
}
CodePudding user response:
Don't want to each entity assignment to knock, reflection? Automapping, no?CodePudding user response: