Example #1
0
        public IActionResult Login(Models.LoginViewModel loginViewModel)
        {
            var result = _accountBll.Login(loginViewModel);

            if (result.Result.IsSuccess)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                ModelState.AddModelError("", result.Result.Message);
            }
            return(View());
        }