public IActionResult AddType() { var model = new AddTypeView(); model.Type = new InventoryType(); return(View(model)); }
public IActionResult AddType(AddTypeView model) { if (ModelState.IsValid) { model.Type.DepartmentId = DepartmentId; _inventoryService.SaveType(model.Type); return(RedirectToAction("ManageTypes")); } return(View(model)); }