Please forgive me if this is a stupid question but if I use the entity framework do I not need to create model classes manually? Does the entity model replace the need for the model?
Suggestions welcome to a complete newbie knob 🙂
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.
I have up-voted this question because people ask me this a lot and I think there is an important interpretation of this design pattern to consider.
The model in MVC has a single purpose – to act as a bag of properties that must be passed between the controller and the view.
If you were to use an entity, instead of a specific model, would that entity contain everything you need? In most cases, the answer is no. You don’t want to add a property to your entity to support something on a UI, so you should have a model that is specifically designed for that purpose.
I have often seen an entity as a property on the model though, which I don’t have any problem with.