mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 12:41:17 +08:00
- Simple create tenant command for the tenant command handler.
--HG-- branch : dev
This commit is contained in:
parent
ed6b6a879e
commit
3a497a0c7b
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user