Skip to content

Getting Started

Somadina Mbadiwe edited this page Sep 11, 2016 · 4 revisions

Installation

At the minimum, you will need the core library MultiTenancyFramework.Core and a supported IoC container (i.e., an IoC container that implements System.IServiceProvider interface). One such IoC is SimpleInjector and we have provided a library for it: MultiTenancyFramework.SimpleInjector.

On a Visual Studio Project, you can launch Manage Nuget Packages... and search Nuget for MultiTenancyFramework to list all available libraries

Get the core library via Nuget by running the following command in the Package Manager Console

Install-Package MultiTenancyFramework.Core

and the framework for SimpleInjector by running the command

Install-Package MultiTenancyFramework.SimpleInjector

To use the framework in an MVC5 web project, then in addition to the two above, you will need MultiTenancyFramework.Mvc, available via Nuget by running the command

Install-Package MultiTenancyFramework.Mvc

Data Access Layer

What you've installed so far will not work out of the box because the codes that interact with the database are provided as contracts (interfaces), so will require their implementations to be supplied. Of course, this means you still retain the power to determine and provide how your solution will interact with data. However, we have provided implementations for data access using the popular ORM framework, NHibernate

If you're developing an MVC5 project, you should get MultiTenancyFramework.Mvc.NHibernate from Nuget using

Install-Package MultiTenancyFramework.Mvc.NHibernate

For a normal (non-web) project, you can get MultiTenancyFramework.NHibernate from Nuget using

Install-Package MultiTenancyFramework.NHibernate

Below is the architecture diagram for the framework. It should help you understand better the relationships between the different libraries.

Architecture Diagram for MultiTenancyFramework

Figure: Architecture Diagram for the MultiTenancyFramework solution

Summary

Concerning web-based development, we hope to provide in future implementations for more combinations of IoC, ORM/Data and Web frameworks. At the moment, we only have implementation for SimpleInjector + NHibernate + MVC5 which only requires you to install only MultiTenancyFramework.Mvc.NHibernate and MultiTenancyFramework.SimpleInjector, and the rest will be added accordingly.

Learn more about using MultiTenancyFramework with NHibernate and SimpleInjector

Clone this wiki locally