public ActionResult SignUp(SignUpModel user)
        {
            if (!ModelState.IsValid)
            {
                return View();
            }

            if (_userService.GetUserByEmail(user.Email) != null)
            {
                ViewBag.Error = MmResources.DublicateUser;
                return View();
            }

            _userService.Insert(user.ToEntity());

            return RedirectToAction("Index", "Home", new { area = "" });
        }
        public JsonResult SignUp(SignUpModel user)
        {
            if (_userService.GetUserByEmail(user.Email) != null)
            {
                return new MmJsonResult(
                    data: null,
                    success: false,
                    errors: new List<string> { MmResources.DublicateUser });
            }

            _userService.Insert(user.ToEntity());

            _emailSender.SendEmail(
                MmResources.CongratulationSbjTemplate,
                string.Format(MmResources.CongratulationMsgTemplate, user.Email),
                user.Email, user.Email);

            return new MmJsonResult(data: null);
        }