public ActionResult AddNewLayout(layout layout) { if (applicationDAO.AddNewLayout(layout)) return RedirectToAction("LayoutList"); else return View("AddNewLayout"); }
public bool AddNewLayout(layout layout) { try { _entities.layout.Add(layout); _entities.SaveChanges(); } catch { return false; } return true; }