2009-12-02 108 views
1

Iam在C#应用程序中实现实体空间,并且能够成功执行下面的查询。存储过程执行问题

coll.query.where(coll.prodlineid.equal( “ID”) 如果(coll.query.load())

不过,我需要在存储过程中替换代码中所有这些查询。为此,我使用了:coll.Load(esQuerytype.storedprocedure,“testproc”,param)

此时,Iam出现'EntitySpaces.Core.esEntityCollection.Load(EntitySpaces.DynamicQuery.esQueryType,string,params object [])'由于其保护级别而无法访问

esEntityCollection是一个元数据文件,所以我无法更改该配置文件ss修饰符从保护到公共。

帮助:-)

回答

1

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

ProductCollection coll = new ProductCollection(); 
coll.GetProducts(lineID); 

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

然后你就可以打电话给你的存储过程