Example #1
0
 public IActionResult Create(CreateRoleVM roleVM)
 {
     if (ModelState.IsValid)
     {
         _roles.Create(roleVM.CreateRole());
         return(RedirectToAction("Index"));
     }
     return(View(roleVM));
 }
Example #2
0
 public IActionResult Create(CreateRoleVM role)
 {
     if (ModelState.IsValid)
     {
         _roles.Create(role.CreateRole());
         return(RedirectToAction("PersonProjectIndex", "ProjectRole"));
     }
     return(View());
 }
Example #3
0
 public IActionResult Create(CreateRoleVM rolevm)
 {
     if (ModelState.IsValid)
     {
         Role role = rolevm.CreateRole();
         _roles.Create(role);
         return(RedirectToAction("Index"));
     }
     return(View());
 }