public void ExistsDemo() { string userId = "123456"; string userName = "admin"; DALDb db = new DALDb(); // sql 语句 PetaPoco.Sql sql = PetaPoco.Sql.Builder.Append("userId=@0", userId); sql.Append("and userName=@0", userName); // 查询 bool result = db.Exists<USER>(sql.SQL, sql.Arguments); }