What kind of naming convention is appropriate for ViewModel classes?
Example: for HomeController, Index view? HomeIndexViewModel doesn’t seem right.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EmployeesViewData.
That’s what I use and what I’ve seen in sample applications as well.
About your added example: Imho the name of the class should specify what kind of data it contains. “….IndexViewData” is rather meaningless. What exactly is displayed on that page? Try to summarize it in 1 or 2 word(s) and add ‘ViewData’ behind it.
Or else just take the name of the controller and drop the “index”. HomeViewData sounds fine to me.