public ActionResult CreateUser()
 {
     if (!WebSecurity.Initialized)
     {
         WebSecurity.InitializeDatabaseConnection("TicketDataBaseContext", "User", "UserId", "UserName", autoCreateTables: true);
     }
     var user = new CreateUser();
     return PartialView("_createUserPartial", user);
 }
 public ActionResult CreateUser(CreateUser user)
 {
     UnitOfWork.AdministrationRepository.CreateUser(UnitOfWork, user);
     return RedirectToAction("Users");
 }
 public void CreateUser(UnitOfWork unit, CreateUser user)
 {
     WebSecurity.CreateUserAndAccount(user.UserName, user.Password, new { FirstName = user.FirstName, Surname = user.Surname, Email = user.Email, Phone = user.Phone });
 }