问题
I have a Site built with MVC4, Entity Framework 4.4. There are 2 projects. ie, The one is about our Site and the other one, the Class library (Definded as the .edmx). This time we need to migrate it to support CMS. And, we have choose to use Orchard CMS. I need to know, whether Orchard supports Entity Framework 4.4 or not.
Any suggestions to this will be highly appreciated.
Thanks
回答1:
You're free to use any custom code in your modules, including EF for accessing databases.
Orchard core (and all logic behind content items' persistence) will still run on top of NH though and that's not going to change anytime soon.
回答2:
Making Orchard to work with EF might be tricky. (Shared my experience when answering this question -- Add Entity Framwork to a Module )
If you can move your EF code into web services, so that to isolate it from working in the same context as NH, you'll be safe.
来源:https://stackoverflow.com/questions/20543595/will-orchard-cms-support-mvc4-with-entity-framework