How do architect an ASP.Net MVC app with EF?

前端 未结 3 502
[愿得一人]
[愿得一人] 2020-12-31 15:27

I\'m having a little bit of trouble conceptualizing how to architect an MVC App with Entity Framework into a n-tiered app.

The normal, textbook 3-tiered app should l

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 16:08

    I can recommend you really good (I think) book about domain driven architecture design on .NET platform. Book si called N-layered domain driven architecture guid with .NET 4.0. In book is explained how to create good architecture with EF and MVC (and many other stuff like Silverlight, IoC with Unity etc.).

    Book can be downloaded on this address:

    http://msdn.microsoft.com/es-es/architecture/en/

    Also sample application is very interesting:

    http://microsoftnlayerapp.codeplex.com/

    Best way how to create entities for EF is creating POCO classes independent on persistent layer. These domain entities are included in Domain (Business) logic layer.

    In book is also explained that application should be devided into more layers, they explaining Presentation, Appliaction, Domain, Infrastructure (data persistence mostly), Cross-cutting and Distributed services layers.

提交回复
热议问题