public async Task <BillingPeriod> GetLastByGroupIdAsync(long groupId) { using (var uow = new UnitOfWork(_databaseContextProvider.Create())) { BillingPeriodDto operation = await uow.BillingPeriods.GetLastByGroupIdAsync(groupId); return(operation?.ToCore()); } }
public async Task <BillingPeriod> UpdateAsync(BillingPeriod item) { using (var uow = new UnitOfWork(_databaseContextProvider.Create())) { BillingPeriodDto operation = await uow.BillingPeriods.UpdateAsync(item.ToData()); await uow.SaveChangesAsync(); return(operation?.ToCore()); } }