diff --git a/src/MultiTenancy/NBB.MultiTenancy.Abstractions/Context/TenantContext.cs b/src/MultiTenancy/NBB.MultiTenancy.Abstractions/Context/TenantContext.cs index 442c7587..b0bddb1a 100644 --- a/src/MultiTenancy/NBB.MultiTenancy.Abstractions/Context/TenantContext.cs +++ b/src/MultiTenancy/NBB.MultiTenancy.Abstractions/Context/TenantContext.cs @@ -1,20 +1,28 @@ // Copyright (c) TotalSoft. // This source code is licensed under the MIT license. +using System.Collections.Generic; + namespace NBB.MultiTenancy.Abstractions.Context { public class TenantContext { public Tenant Tenant { get; } - + public Dictionary Properties { get; set; } = []; public TenantContext(Tenant tenant) { Tenant = tenant; } + public TenantContext(Tenant tenant, Dictionary properties) + { + Tenant = tenant; + Properties = properties; + } + public TenantContext Clone() { - return new TenantContext(new Tenant(Tenant.TenantId, Tenant.Code)); + return new TenantContext(new Tenant(Tenant.TenantId, Tenant.Code), new Dictionary(Properties)); } } }