public IActionResult UpdateDetails() { context = HttpContext.RequestServices.GetService(typeof(BCare.data.BcareContext)) as BcareContext; String cookie = Request.Cookies["Session"]; var userDetails = context.GetUserDetailsByID(Int32.Parse(cookie.Substring(10))); return(View(userDetails)); }
public IActionResult Details() { context = HttpContext.RequestServices.GetService(typeof(BCare.data.BcareContext)) as BcareContext; String cookie = Request.Cookies["Session"]; List <health_maintenance_organizations> listHMO = context.GetAllHMO(); ViewBag.ListHMO = new SelectList(listHMO, "HMOID", "HMOName"); if (cookie != null) { UserDetailViewModel userDetails = context.GetUserDetailsByID(Int32.Parse(cookie.Substring(10))); userDetails.user.PWHash = ""; return(View(userDetails)); } else { return(View()); } }