public JsonResult CheckLogin(string username, string password) { db_WoodWiseEntities db = new db_WoodWiseEntities(); var dataItem = db.Tbl_User.Where(x => x.UserName == username && x.Password == password).First(); bool isLogged = true; if (dataItem != null) { FormsAuthentication.SetAuthCookie(dataItem.UserName, false); isLogged = true; } else { isLogged = false; } return(Json(isLogged, JsonRequestBehavior.AllowGet)); }
public GenericRepository(db_WoodWiseEntities DBEntity) { _DBEntity = DBEntity; _dbSet = _DBEntity.Set <Tbl_Entity>(); }