Update Multi-Tenancy.md

pull/5849/head
maliming 5 years ago
parent 23f4610e7b
commit 098daee446

@ -329,6 +329,7 @@ Configure<AbpTenantResolveOptions>(options =>
`MyCustomTenantResolveContributor` must inherit from the `TenantResolveContributorBase` (or implement the `ITenantResolveContributor`) as shown below:
````csharp
using System.Threading.Tasks;
using Volo.Abp.MultiTenancy;
namespace MultiTenancyDemo.Web
@ -337,7 +338,7 @@ namespace MultiTenancyDemo.Web
{
public override string Name => "Custom";
public override void Resolve(ITenantResolveContext context)
public override Task ResolveAsync(ITenantResolveContext context)
{
//TODO...
}

@ -127,13 +127,14 @@ namespace MyCompany.MyProject
`MyCustomTenantResolveContributor`必须像下面这样实现**ITenantResolveContributor**接口:
````C#
using System.Threading.Tasks;
using Volo.Abp.MultiTenancy;
namespace MyCompany.MyProject
{
public class MyCustomTenantResolveContributor : ITenantResolveContributor
{
public void Resolve(ITenantResolveContext context)
public override Task ResolveAsync(ITenantResolveContext context)
{
context.TenantIdOrName = ... //从其他地方获取租户id或租户名字...
}

Loading…
Cancel
Save