public bool UpdateEnquiry(Enquiry usr)
 {
     Enquiry enquiryToUpdate = _context.Enquiries.Where(u => u.Id == usr.Id).SingleOrDefault();
     enquiryToUpdate.Name = usr.Name;
     enquiryToUpdate.Email = usr.Email;
     enquiryToUpdate.Contact = usr.Contact;
     enquiryToUpdate.Details = usr.Details;
     _context.Entry(enquiryToUpdate).State = System.Data.Entity.EntityState.Modified;
     return (_context.SaveChanges() > 0);
 }
 public JsonResult UpdateEnquiry(Enquiry enquiry)
 {
     return Json(repo.UpdateEnquiry(enquiry));
 }
 public JsonResult CreateEnquiry(Enquiry enquiry)
 {
     return Json(repo.CreateEnquiry(enquiry));
 }
 public bool CreateEnquiry(Enquiry model)
 {
     _context.Enquiries.Add(model);
     return (_context.SaveChanges() > 0);
 }