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);
}

 

posted @ 2020-09-29 17:22  tommy~hi  阅读(362)  评论(0编辑  收藏  举报