2
I have the following question: do I get one Viewmodel in the Controller of ASP.NET. In the update method I have two options:
- 1st option : transfer the Viewmodel to the respective bank entity directly and update.
- 2nd option : First search for the id of the object to be updated and then transfer the Viewmodel to the respective bank entity and update.
What would be the right way to do it?
face, take a look at these links http://eduardopires.net.br/2013/asp-net-mvc-view-model-pattern-quando-e-como-utilizar/ http://eduardopires.net.br/2013/08/asp-net-mvc-utilizando-automapper-comview-model-pattern/ http://www.asp.net/mvc/overview/older-versions/mvc-music-store/mvc-music-store-part-3 http://www.princiweb.com.br/blog/programacao/design-patterns/o-que-e-e-e-como-utilizar-o-padrao-view-modelem-um-projeto-aspnet-mvc.html
– Pablo Tondolo de Vargas
The first option would be to create a table in the database with the Viewmodel data?
– Randrade