Modular applications with Entity Framework Code Only and ASP.NET MVC

怎甘沉沦 提交于 2019-12-05 04:45:15

I have achieved this using EF Code First and a combination of GUI extension points on the core module. It resulted in:

  • Each module is treated as a standalone application (except for GUI)
  • Each module has it's own database (as code first drops & recreates database)
  • Each module may duplicate needed data in another module
  • Each module is a service
  • Each module can extend the GUI through core extension points via an IoC container
  • Modules can communicate with each either via asynchronous messaging (nServiceBus) and synchronous RPC (WCF)

Please note that this is an enterprise application that we designed for SOA.

With EF Code First, if you manage your database manually (ie. don't drop & recreate), you could take some concepts above and simplify it. You may need a custom IDatabaseInitializer to support it but it should be possible.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!