I am using MVC3, Razor and EF5.
I have now realised that using a ViewModel for each page in a Wizard is a good idea, especially when you need to validate part of a record. I also need to save after each page submit. The Domain model has no validation annotations.
However I have now thought of a better/worse idea???!!! Ultimately I will be generating XML from the DB to put this record into a report. Therefore it could be possible/advisable to have a ViewModel with explicit column names and a domaim Model with just the XML field that all the ViewModel Property data goes into. Thoughts?
Thanks.
Since XML is meant for storage / exchange, I’d think it would just make the ViewModels more complex. I’d think you could write code that turns your ViewModels into XML at the end.