1

我正在 C# 应用程序中实现实体空间,并且能够成功执行如下查询。

coll.query.where(coll.prodlineid.equal("id") if(coll.query.load())

但是我需要用存储过程替换代码中的所有这些查询。为此我使用: coll.Load(esQuerytype.storedprocedure, "testproc", param)

此时,我收到错误,因为 'EntitySpaces.Core.esEntityCollection.Load(EntitySpaces.DynamicQuery.esQueryType, string, params object[])' 由于其保护级别而无法访问

esEntityCollection 是一个元数据文件,所以我无法将那里的访问修饰符从受保护更改为公共。

帮助:-)

4

1 回答 1

1

在您的自定义部分类(您已生成)中,添加如下方法。

public void GetProducts(int LineID)
{
   this.Load( ...<put your stored proc call here>...);
}

然后您可以通过以下方式调用您的存储过程:

ProductCollection coll = new ProductCollection();
coll.GetProducts(lineID);
于 2010-05-04T15:14:49.537 回答