public async Task <List <User> > GetAll() { var result = await ItemSet.AsNoTracking().ToListAsync(); result.ForEach(p => p.Password = null); return(result); }
public async Task <MyCart> GetAll(long customerId) { var products = await ItemSet.AsNoTracking().Where(p => p.UserId == customerId).Include(p => p.Product).ToListAsync(); var myCart = new MyCart() { Products = products.Select(p => p.Product).ToList(), }; return(myCart); }