Why do we need viewmodel in mvc?



Why do we need viewmodel in mvc?..

Answer / Neha Jauhari

We need a ViewModel in MVC for several reasons: it simplifies the communication between the View and the Model by providing a simpler, more manageable interface; it allows us to encapsulate application-specific logic within the ViewModel, reducing the complexity of both the View and the Controller; and it facilitates data binding between the View and the Model.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MVC Model View Controller Interview Questions

What is razor syntax?

1 Answers  


Mention what is the importance of nonactionattribute?

1 Answers  


What is mvc routearea?

1 Answers  


What is tempdata in mvc?

1 Answers  


What is the use of spring mvc?

1 Answers  


What is get and post actions types?

1 Answers  


What are the filter in mvc?

1 Answers  


Is mvc stateless?

1 Answers  


What are the 3 things that are needed to specify a route?

1 Answers   NA,


What is data annotation in mvc?

1 Answers  


What is the difference between "actionresult" and "viewresult" ?

1 Answers  


What is view engine in mvc?

1 Answers  


Categories