public override async Task <Guid?> GetOrNullAsync(AuditDefinition audit) { var dbEntity = await AuditFlowRepository .FirstOrDefaultAsync(x => x.ProviderName == ProviderName && x.AuditName == audit.Name && x.Enable); return(dbEntity?.Id); }
public override async Task <Guid?> GetOrNullAsync(AuditDefinition audit) { var tenantId = _currentTenant.Id?.ToString(); var dbEntity = await AuditFlowRepository .FirstOrDefaultAsync( x => x.ProviderName == ProviderName && x.AuditName == audit.Name && x.Enable && x.ProviderKey == tenantId ); return(dbEntity?.Id); }
protected virtual async Task <Guid?> GetOrNullValueFromProvidersAsync( IEnumerable <IAuditValueProvider> providers, AuditDefinition audit) { foreach (var provider in providers) { var value = await provider.GetOrNullAsync(audit); if (value != null) { return(value); } } return(null); }
public override async Task <Guid?> GetOrNullAsync(AuditDefinition audit) { if (_currentShop.Id == null) { return(null); } var dbEntity = await AuditFlowRepository .FirstOrDefaultAsync( x => x.ProviderName == ProviderName && x.AuditName == audit.Name && x.Enable && x.ProviderKey == _currentShop.Id.ToString() ); return(dbEntity?.Id); }
public abstract Task <Guid?> GetOrNullAsync(AuditDefinition audit);