public ActionResult Signup(User model)
 {
     using (var context = new OfficeEntities1())
     {
         context.User.Add(model);
         context.SaveChanges();
     }
     return(RedirectToAction("Login"));
 }
 public ActionResult Login(Membership model)
 {
     using (var context = new OfficeEntities1())
     {
         bool isValid = context.User.Any(x => x.UserName == model.UserName && x.Password == model.Password);
         if (isValid)
         {
             FormsAuthentication.SetAuthCookie(model.UserName, false);//(name of the user,browser a save krbo na tai false diyechi)
             return(RedirectToAction("Index", "Employees"));
         }
         ModelState.AddModelError("", "Invalid Username or Password");
         return(View());
     }
 }