I'm learning about ASP.NET and working in an application and I don't seem to understand the difference between the Model and the ViewModel
. When in a View the information you want is taken from the Model you call using @model
. If you want to make a dropdown list
you will display the information you get from there right? When using @Html.Action
you call a method of the Controller where you create a ViewModel
object with the same {get; set}
methods and the same information as the Model. So why using this if it's the same as the Model? Or it isn't?
Probably my question doesn't make 100% sense, keep in mind I'm still new to ASP.NET
. What I need to understand is the difference between the Model
and the ViewModel
.
I found this post: ASP.NET MVC Model vs ViewModel, but I need the answer to be more specific.