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