public ActionResult About(string Name, string ip) { ResourceAccess RA = new ResourceAccess(); var login = new LoginModel(); //if (Convert.ToString(Session["UserId"]) != "" && Convert.ToString(Session["UserId"]) != null) //{ // login.Id = Convert.ToInt32(Session["UserId"]); //} //else { var response = RA.AddUser(Name, ip); Session["UserName"] = Name; Session["UserId"] = response.Id; login = response; //} return(View(login)); }