コード例 #1
0
 public ActionResult CreateUser([Bind(Prefix = "UserDto")] UserDto dto)
 {
     if (ModelState.IsValid)
     {
         _pharmacyService.CreateUser(dto, _context);
         return(RedirectToAction("Index"));
     }
     return(View("CreateUser"));
 }
コード例 #2
0
 public ActionResult CreateUser([Bind(Prefix = "UserDto")] UserDto dto)
 {
     dto.Role = "Uzytkownik";
     if (ModelState.IsValid)
     {
         _pharmacyService.CreateUser(dto, _context);
         return(RedirectToAction("Login"));
     }
     return(View("CreateUser"));
 }