Picflight
Picflight

Reputation: 3852

How is multi-tenancy done in the Orchard Project

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

OrchardProject

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

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.

The areas I have looked at:

Upvotes: 13

Views: 5046

Answers (3)

Rohit Gupta
Rohit Gupta

Reputation: 624

There are some sample projects demonstrating multi-tenant deployments:

Cloud Ninja Cloud Samurai

Upvotes: 1

Erik Funkenbusch
Erik Funkenbusch

Reputation: 93424

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.

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 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.

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

Upvotes: 2

Related Questions