Before I start, I want to say that I know what a ViewModel is, and what its purpose is, but this scenario makes it redundant .. please read on :)
I am working on an ASP.NET MVC4 application, and have come across some headache with regards to PagedList, Domain Entities and ViewModels.
Basically, the PagedList.MVC plugin does not work nicely with AutoMapper, and I have to do a lost of extra work to get it to work as I want it.
But then I thought, do I even need a ViewModel class when all the properties on the Domain Entity in question are required?
Of what benefit is a ViewModel when every single property on your Domain Entity is required by the View?
It can be a matter of opinion, I like using view models (and DTOs) which gives the following benefits:
Now to counter the above, and many would, you could work directly with your domain objects. I'd probably recommend this too if you find your view models are simply one to one likenesses of your domain and you don't see any benefit in the above.
As usual it depends on your setup