public OrderInfo Get(int id) { using (GroceryStoreDBEntities entities = new GroceryStoreDBEntities()) { return(entities.OrderInfo.FirstOrDefault(e => e.Id == id)); } }
public IEnumerable <OrderInfo> Get() { using (GroceryStoreDBEntities entities = new GroceryStoreDBEntities()) { return(entities.OrderInfo.ToList()); } }
public Product Get(int id) { using (GroceryStoreDBEntities entities = new GroceryStoreDBEntities()) { return(entities.Product.FirstOrDefault(e => e.Id == id)); } }
public IEnumerable <Product> Get() { using (GroceryStoreDBEntities entities = new GroceryStoreDBEntities()) { return(entities.Product.ToList()); } }
public Supplier Get(int id) { using (GroceryStoreDBEntities entities = new GroceryStoreDBEntities()) { return(entities.Supplier.FirstOrDefault(e => e.Id == id)); } }
public IEnumerable <Supplier> Get() { using (GroceryStoreDBEntities entities = new GroceryStoreDBEntities()) { return(entities.Supplier.ToList()); } }