Asp.net MVC 2 - View Model / Model Validation. Is there a way to map validation attributes from model to ViewModel using AutoMapper?

Some time ago, I'm sure I read that it was possible to use AutoMapper to map validation attributes from a domain model to a view model, I can't find this entry anymore, though!

Has anyone seen any code or knew if this can be done? This would give the added benefit of not repeating validation on ViewModel + models.

Floor

+4
source share

Source: https://habr.com/ru/post/1311016/


All Articles