Orchard 项目中的多租户是如何完成的 [英] How is multi-tenancy done in the Orchard Project

查看:26
本文介绍了Orchard 项目中的多租户是如何完成的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在逐步浏览 Orchard CMS 的源代码,以了解他们如何解决多租户问题.

I have been stepping through the source code for Orchard CMS to learn how they have tackled Multi-tenancy.

OrchardProject

有人可以指出我应该查看的文件或区域以了解管道如何在 Orchard 中实现多租户吗?

Can someone point out the files or areas I should be looking at to understand how the plumbing works for Multi-tenancy in Orchard?

  • 如何以及在哪里解密域名以从数据库中获取租户?
  • 在用户访问网站(会话)的整个过程中如何维护租户配置详细信息?

作为一个测试项目,我希望能够在 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

推荐答案

您需要从果园画廊安装多租户模块,启用它,并在设置中进行配置.

You need to install the multi-tennancy module from the orchard gallery, enable it, and configure it in settings.

您要查看的代码是多租户模块子文件夹中的代码.

The code you want to look at is, the code that is in the multi-tennant module subfolder.

但是,了解 Orchard 如何进行多租户对您没有多大帮助.Orchard 有一个非常复杂的路由和扩展系统,有大量的层和动态调度点.您不能简单地将 Orchard 的内部系统放入一个简单的 MVC 应用程序中,而无需重新创建 Orchard 的所有基础设施.

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.

Orchard 不是一个关于如何编写独立 MVC 应用程序的好例子,因为它对灵活性有很多要求,而且它的系统大量基于动态的 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.

除非您有特殊原因需要使用 Orchard 方法,否则您将更适合查看这样的解决方案 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

这篇关于Orchard 项目中的多租户是如何完成的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆