Asp.Net MVC and Entity Framework Architecture


Asp.Net MVC and Entity Framework Architecture



I'm working on a fairly large project at the moment and am currently in the planning stages. I've done a lot of reading into the various patterns suggested for development, somthing that has split the team at the moment is when using Entity Framework should the classes be passed through the applciation layers so that a view accepts an Entity Framework class or should these classes be mapped to BLL Classes and if so at which point (Controller or Library) should this be done?

I'm interested in hearing some positives and negitives for each solutions.


Maintaining state and data context between requests

1:

How can I use partial views in ASP.NET?
This is again one of those questions this doesn't really have a right or wrong answer, its personal taste really. ASP.NET MVC 2 - Html.DropDownList not working in an AJAX formPersonally I would opt for using DTO's or interfaces when passing data to the Views. Using Structuremap to manage ObjectContext Lifetime in ASP.NET MVCI don't tend to pass around entity objects to different layers of my application they are strictly confined to the DAL, or if I did need to pass it up a layer I would almost always use an interface never the concrete type.. UrlRewriting from ASP.NET WebApplication to ASP.NET MVC WebApplication
Localization with separate Language folders within ViewsHow to create a reusable Asp.Net Mvc application?

2:

Client Id for Property (ASP.Net MVC)
This is one of those great "it depends" questions ..... For me it's a matter of pragmatism. I use the raw entity classes where ever I must for expediency. I start using DTOs when either the object graph in question starts becoming too cumberany or the object in question has sensitive data I don't want sent over the wire..


89 out of 100 based on 64 user ratings 959 reviews

@