public ActionResult SchoolIndex(login lobject)
 {
     try
     {
         if (lobject.username != null && lobject.password != null)
         {
             login user = (from log in db.logins where log.username.Equals(lobject.username) && log.password.Equals(lobject.password) select log).First();
             Session["id"] = user.username;
             Session["pwd"] = user.password;
             return View();
         }
         else {
             return RedirectToAction("signin");
         }
     }
     catch (Exception E)
     {
         return RedirectToAction("signin");
     }
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the logins EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTologins(login login)
 {
     base.AddObject("logins", login);
 }
 /// <summary>
 /// Create a new login object.
 /// </summary>
 /// <param name="username">Initial value of the username property.</param>
 /// <param name="password">Initial value of the password property.</param>
 public static login Createlogin(global::System.String username, global::System.String password)
 {
     login login = new login();
     login.username = username;
     login.password = password;
     return login;
 }