Пример #1
0
 public Enquiry FindEnquiry(int enquiryId)
 {
     try {
         Enquiry enquiry = restaurantDB.Enquiries.Find(enquiryId);
         return(enquiry);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #2
0
 public int EditEnquiry(Enquiry enquiry)
 {
     try {
         restaurantDB.Entry(enquiry).State = EntityState.Modified;
         int flag = restaurantDB.SaveChanges();
         return(flag);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #3
0
 public int CreateEnquiryEntry(Enquiry enquiry)
 {
     try {
         restaurantDB.Enquiries.Add(enquiry);
         int flag = restaurantDB.SaveChanges();
         return(flag);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #4
0
 public int DeleteEnquiry(int enquiryId)
 {
     try {
         Enquiry enquiry = restaurantDB.Enquiries.Find(enquiryId);
         restaurantDB.Enquiries.Remove(enquiry);
         int flag = restaurantDB.SaveChanges();
         return(flag);
     }
     catch (Exception e)
     {
         throw e;
     }
 }