PetaPoco中使用Exists

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);
}
原文地址:https://www.cnblogs.com/nayilvyangguang/p/13750741.html