I have two design options to go ahead with when using MVC and NHibernate
-
Create a class that NHibernate uses to map to the database and create a separate class that MVC uses as the Model that the Controller passes back and forward to the view. Obviously there needs to be some data transfer methods between the two.
-
Use one class for both task and thus reduce the amount of code.
What is the best design method
In terms of best practices definitely and without absolutely any doubt: number 1. The something that maps is called AutoMapper and the separate class you are talking about is called view model.