public async Task <T> GetByPkAsync <T>(BaseEntity model) { string sql = SQLBuilderHelper.GetByPkSql(model, this.GetORMDBType()); return(await this.GetAsync <T>(sql, model)); }
/// <summary> /// 根据主键查询 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="model"></param> /// <returns></returns> public T GetByPk <T>(BaseEntity model) { string sql = SQLBuilderHelper.GetByPkSql(model, this.GetORMDBType()); return(this.Get <T>(sql, model)); }