public async Task <Product> GetByIdAsync(string id) { var products = await SwordsContext.GetProductsAsync(); var product = products.FirstOrDefault(p => p.ProductId == id); return(product); }
public async Task <IEnumerable <Product> > GetAllAsync() { var products = await SwordsContext.GetProductsAsync(); return(products); }