This commit is contained in:
2021-02-17 16:05:14 +00:00
parent 8f1cb5d276
commit 8727b6c93e
2 changed files with 2 additions and 2 deletions

View File

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