예제 #1
0
 /// <inheritdoc />
 public async Task <IList <LogDTO> > GetPerItem(int id)
 {
     if (await items.AllAsync(s => s.Id != id))
     {
         throw new ArgumentException();
     }
     return(await itemLogs.AsNoTracking().Include(s => s.Item)
            .Where(s => s.Item.Id == id)
            .Select(s => LogDTO.FromItemLog(s))
            .ToListAsync());
 }
예제 #2
0
 /// <inheritdoc />
 public async Task <IList <LogDTO> > GetAllItemLogs()
 {
     return(await itemLogs.Include(s => s.Item).AsNoTracking().Select(s => LogDTO.FromItemLog(s)).ToListAsync());
 }