Exemple #1
0
        /// <inheritdoc />
        public async Task <IList <LogDTO> > GetByUser(int id)
        {
            if (await currencyLogs.AllAsync(s => s.ShopUser.Id != id))
            {
                throw new ArgumentException();
            }

            return(await currencyLogs.Include(s => s.ShopUser)
                   .Where(s => s.ShopUser.Id == id)
                   .OrderBy(s => s.Time)
                   .Select(s => LogDTO.FromCurrencyLog(s)).ToListAsync());
        }
Exemple #2
0
 /// <inheritdoc />
 public async Task <IList <LogDTO> > GetAllCurrencyLogs()
 {
     return(await currencyLogs.Include(s => s.ShopUser).AsNoTracking().Select(s => LogDTO.FromCurrencyLog(s)).ToListAsync());
 }