- Simple create tenant command for the tenant command handler.

--HG--
branch : dev
This commit is contained in:
Suha Can 2010-04-21 16:00:03 -07:00
parent ed6b6a879e
commit 3a497a0c7b

View File

@ -1,4 +1,5 @@
using Orchard.Commands;
using Orchard.Environment.Configuration;
using Orchard.MultiTenancy.Services;
namespace Orchard.MultiTenancy.Commands {
@ -25,5 +26,18 @@ namespace Orchard.MultiTenancy.Commands {
Context.Output.WriteLine(T("---------------------------"));
}
}
[CommandHelp("tenant add <tenantName> <providerName> <connString> <prefix>: create new tenant named <tenantName> on the site")]
[CommandName("tenant add")]
public void Create(string tenantName, string providerName, string connectionString, string prefix) {
Context.Output.WriteLine(T("Creating tenant"));
_tenantService.CreateTenant(
new ShellSettings {
Name = tenantName,
DataProvider = providerName,
DataConnectionString = connectionString,
DataPrefix = prefix
});
}
}
}