public ActionResult Create(RoleVm.Create model) { if (ModelState.IsValid) { _roleSvc.Create(model.RoleName, model.RoleDescription); GetAlert(Success, "Role created!"); return(RedirectToAction("Index")); } GetAlert(Danger, "Error!"); return(View("Create", model)); }
public ActionResult Create() { var model = new RoleVm.Create(); return(View("Create", model)); }