This commit is contained in:
pavelbannov 2023-06-28 18:07:50 +03:00
parent bce52a2549
commit 23889afe39

View File

@ -40,9 +40,8 @@ class DbQuotaService : IQuotaService
public async Task<IEnumerable<TenantQuota>> GetTenantQuotasAsync()
{
await using var coreDbContext = _dbContextFactory.CreateDbContext();
return await coreDbContext.Quotas
.ProjectTo<TenantQuota>(_mapper.ConfigurationProvider)
.ToListAsync();
return _mapper.Map<List<DbQuota>, List<TenantQuota>>(await coreDbContext.Quotas.ToListAsync());
}
public async Task<TenantQuota> GetTenantQuotaAsync(int id)