public ActionResult Create(UserRegistration userregistration)
        {
            if (ModelState.IsValid)
            {
                db.UserRegistrations.Add(userregistration);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(userregistration);
        }
 public ActionResult LogIn(UserRegistration user)
 {
     using (UsersDBContext uc = new UsersDBContext())
         {
             var v = uc.UserRegistrations.Where(a => a.UserName.Equals(user.UserName) && a.Password.Equals(user.Password)).FirstOrDefault();
             if (v != null)
             {
                 Session["LoggedUserID"] = v.ID.ToString();
                 Session["LoggedUserName"] = v.UserName.ToString();
                 return RedirectToAction("AfterLogIn");
             }
         }
         return View(user);
 }