public StoreDetail GetStoreDetail(int StoreID) { using (var context = new CookieStoreDBContext()) { return(context.StoreDetails.FirstOrDefault(m => m.StoreID == StoreID)); } }
public List <StoreDetail> GetStoreDetails() { using (var context = new CookieStoreDBContext()) { return(context.StoreDetails.ToList()); } }
public List <CookieOrder> GetCookieOrderOfStore(int StoreID) { using (var context = new CookieStoreDBContext()) { return(context.CookieOrders.Where(m => m.StoreID == StoreID).ToList()); } }
public void AddStoreDetails(StoreDetail storeDetails) { using (var context = new CookieStoreDBContext()) { context.StoreDetails.Add(storeDetails); context.SaveChanges(); } }
public void AddCookieOrder(CookieOrder cookieOrder) { using (var context = new CookieStoreDBContext()) { context.CookieOrders.Add(cookieOrder); context.SaveChanges(); } }