ASP.NET MVC Architecture and Entity Framework
I am currently working on a fairly large project and am at the planning stage. I read a lot in the various templates suggested for development, what was separating the team at the moment is when to use Entity Framework, if the classes will go through the layers of the application so that the view will accept the Entity Framework class or should these classes map to BLL classes. and if so, at what point (controller or library) should this be done?
I am interested to hear some positive and negative aspects for each solution.
a source to share
This is again one of those questions that doesn't really have a right or wrong answer, his personal taste. Personally, I would choose to use DTOs or interfaces when passing data to views. I'm not inclined to pass object objects to other layers in my application, they are strictly DAL limited, or if I need to pass it to a layer, I would almost always use an interface that was never specific.
a source to share
This is one of those great "it depends" questions ....
For me, this is a matter of pragmatism. I use raw entity classes where ever I can for expediency. I start using DTOs when either the object graph in question gets too cumbersome or the object in question has sensitive data that I don't want to send over the wire.
a source to share