예제 #1
0
        public ActionResult Register(RegistrationViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var enterprise = _mapper.Map <Enterprise>(model);

            _enterpriseService.Register(model.UserName, model.Password, enterprise);

            return(RedirectToAction("Index", "Home"));
        }