public static async Task <StockItem> GetStockItemsByStockItemNameAsync(this WideWorldImportersDbContext dbContext, StockItem entity) => await dbContext.StockItems.FirstOrDefaultAsync(item => item.StockItemName == entity.StockItemName);
public async Task <StockItem> GetStockItemAsync(StockItem entity) { return(await DbContext.StockItems.FirstOrDefaultAsync(item => item.StockItemID == entity.StockItemID)); }
public async Task <StockItem> GetStockItemsByStockItemNameAsync(StockItem entity) => await DbContext.StockItems.FirstOrDefaultAsync(item => item.StockItemName == entity.StockItemName);
public async Task <StockItem> GetStockItemsByStockItemNameAsync(StockItem entity) { return(await DbContext.StockItems.Where(item => item.StockItemName == entity.StockItemName).SingleOrDefaultAsync()); }