I've been working with ASP.Net MVC for around a year now and have created my applications in the following way.

X.Web - MVC Application Contains Controller and Views

X.Lib - Contains Data Access, Repositories and Services.

This allows us to drop the .Lib into any application that requires it.

At the moment we are using Entity Framework, the conversion from EntityO to a more specific model is done in the controller.

This set-up means if a service method returns an EntityO and then the Controller will do a conversion before the data is passed to a view.

I'm interested to know if I should move the conversion to the Service so that the app doesn't have Entity Objects being passed around.

没有正确的解决方案

许可以下: CC-BY-SA归因
scroll top