|
|
|
@ -154,11 +154,6 @@ namespace Volo.Abp.Application.Services |
|
|
|
|
|
|
|
protected virtual void TryToSetTenantId(TEntity entity) |
|
|
|
{ |
|
|
|
if (entity is IMultiTenant tenantEntity && tenantEntity.TenantId.HasValue) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var tenantId = CurrentTenant.Id; |
|
|
|
|
|
|
|
if (!tenantId.HasValue) |
|
|
|
@ -173,5 +168,10 @@ namespace Volo.Abp.Application.Services |
|
|
|
propertyInfo.SetValue(entity, tenantId, null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual bool HasTenantIdProperty(TEntity entity) |
|
|
|
{ |
|
|
|
return entity.GetType().GetProperty(nameof(IMultiTenant.TenantId)) != null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|