public ActionResult AddNewService(service_type service) { if (applicationDAO.AddNewService(service)) return RedirectToAction("ServiceTypeList"); else return View("AddNewService"); }
public bool AddNewService(service_type service_type) { try { _entities.service_type.Add(service_type); _entities.SaveChanges(); } catch { return false; } return true; }