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