public ActionResult CreateUser(RegisterModel model) { User user = new User(); user.Id = model.Username; user.Password = model.Password; user.Email = model.Email; user.IsAdmin = model.IsAdmin; FoireMusesConnection connection = GetConnection(); user = connection.CreateUser(user, new Result <User>()).Wait(); return(RedirectToAction("Index", "Home", null)); }