开发者

Abstracting the accountcontroller MVC

How would I go about abstracting the membership information in MVC3 c#

Currently the membership data is kept on a localhost SQL server and is linked to MVC via the Entity Framewor开发者_如何学Gok.

As I want to perform some extensions, I need to abstract it, creating an interface and class for each entity in the SQL database?

Where would I start? Are there any examples available? I can only find ones that are out of date or irrelevant


I think you can rearrange your application, introducing a service layer separated from your presentation layer. The object model (domain model) that you define in the presentation layer for User and other entities should be distinct from the EF data model, so you need only that some sevices ( for example you can implement these as Web Services) read the data using EF and populate your domain model of the presentataion layer. This approach allows your application to be more flexible to future changes or extensions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜