This commit is contained in:
2021-03-06 01:12:27 +00:00
parent a11e423375
commit 2ecfb25f94
6 changed files with 13 additions and 2 deletions

View File

@@ -98,7 +98,14 @@ namespace AyaNova.Biz
//
internal async Task<Contract> GetAsync(long id, bool logTheGetEvent = true)
{
var ret = await ct.Contract.AsNoTracking().SingleOrDefaultAsync(m => m.Id == id);
var ret = await ct.Contract
.Include(z => z.ContractPartOverrideItems)
.Include(z => z.ContractServiceRateOverrideItems)
.Include(z => z.ContractTravelRateOverrideItems)
.Include(z => z.ServiceRateItems)
.Include(z => z.TravelRateItems)
.AsNoTracking()
.SingleOrDefaultAsync(m => m.Id == id);
if (logTheGetEvent && ret != null)
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);
return ret;