public IActionResult Login(Doctor doctor) { if (ModelState.IsValid) { var dr = _doctorService.Get(doctor.Login); if (dr != null && dr.Password.Equals(doctor.Password)) { HttpContext.Session.SetString("user", doctor.Login); _greeting.SetUser(doctor.Login); return(RedirectToAction("Index", "Home")); } } return(View()); }