public ActionResult GetDetails()
 {
     if (Request.Cookies["userName"] != null && Request.Cookies["userName"].Value != null)
     {
         FindUserRepository get = new FindUserRepository();
         UsersModel         use = get.FindUserModelByUserName(Request.Cookies["userName"].Value);
         return(View(use));
     }
     else
     {
         return(View());
     }
 }
 public ActionResult GetDetails(UsersModel user)
 {
     if (ModelState.IsValid)
     {
         AddToDBRepository add = new AddToDBRepository();
         add.AddUser(user);
         HttpCookie cookie = new HttpCookie("userName");
         cookie.Value = user.userName.ToString();
         Response.Cookies.Add(cookie);
         FindUserRepository get = new FindUserRepository();
         UsersModel         use = get.FindUserModelByUserName(Request.Cookies["userName"].Value);
         return(View(use));
     }
     else
     {
         return(View());
     }
 }