예제 #1
0
 public static async Task <StockItem> GetStockItemsByStockItemNameAsync(this WideWorldImportersDbContext dbContext, StockItem entity)
 => await dbContext.StockItems.FirstOrDefaultAsync(item => item.StockItemName == entity.StockItemName);
예제 #2
0
 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);
예제 #4
0
 public async Task <StockItem> GetStockItemsByStockItemNameAsync(StockItem entity)
 {
     return(await DbContext.StockItems.Where(item => item.StockItemName == entity.StockItemName).SingleOrDefaultAsync());
 }