如何在果园项目做多租户 [英] How is multi-tenancy done in the Orchard Project
问题描述
我一直在通过加强源头code为果园CMS了解他们如何解决多租户。
I have been stepping through the source code for Orchard CMS to learn how they have tackled Multi-tenancy.
有人能指出我应该看的文件或地区,了解管道如何工作的多租户在果园?
Can someone point out the files or areas I should be looking at to understand how the plumbing works for Multi-tenancy in Orchard?
- 如何以及在哪里是域名破译从DB获得租户?
- 租户配置细节如何保持整个用户在网站上的时间 - 会话
作为测试项目,我希望能够写出类似的裸骨code在ASP.Net MVC应用程序来演示多租户。
As a test project, I want to be able to write similar bare-bone code in an ASP.Net MVC application to demonstrate multi-tenancy.
我看过的方面:
- OnBeginRequest
- Global.cs
- Stater.cs
推荐答案
您需要从果园画廊安装多tennancy模块,启用它,并且在设置进行配置。
You need to install the multi-tennancy module from the orchard gallery, enable it, and configure it in settings.
在code,你想看看就是,code是在多坦模块的子文件夹。
The code you want to look at is, the code that is in the multi-tennant module subfolder.
不过,果园知道如何做多租户不会有太大的帮助你。果园有一个非常复杂的路由和推广体系,拥有万吨层和动态调度点。你不能在果园的内部系统简单地拖放到一个简单的MVC应用程序没有,基本上,所有重建果园的基础设施。
However, knowing how Orchard does multi-tenancy won't much help you. Orchard has a very complex routing and extension system, with tons of layers and dynamic dispatch points. You can't simply drop in Orchard's internal system into a simple MVC app without, basically, recreating all of Orchard's infrastructure.
果园不是如何写一个独立的MVC应用程序一个很好的例子,因为它有灵活这么多的要求,其系统是如此heavly基于动态claysharp东西。
Orchard is not a good example of how to write a stand-alone MVC app, because it has so many requirements for flexibility, and its system is so heavly based on the dynamic claysharp stuff.
除非是你需要使用专门的果园方法的原因,你会更适合看这样的解决方案的 http://weblogs.asp.net/zowens/archive/tags/Multi-tenancy/default.aspx
Unless there is a reason you need to use the Orchard method specifically, you'd be better suited looking at solutions like this http://weblogs.asp.net/zowens/archive/tags/Multi-tenancy/default.aspx
这篇关于如何在果园项目做多租户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!