public IActionResult Create([Bind("DepartmentId,Name")] Department department) { if (ModelState.IsValid) { var dept = _dept.Add(department); RedirectToAction("Index"); } else { return(View()); } return(View(department)); }
public bool Add(E_Model.Dept model) { return(dal.Add(model)); }