2009-12-02 109 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>...); 
} 

然後你就可以打電話給你的存儲過程