开发者

subsonic bug? ExpressionVisitor linq

开发者 https://www.devze.com 2023-01-13 22:37 出处:网络
I have a problem with this subsonic3.0.0.4 find statement: IList<Market> marketlist = marketlRep.Find<Market>(

I have a problem with this subsonic3.0.0.4 find statement:

 IList<Market> marketlist = marketlRep.Find<Market>(
     type => type.MarketType == Convert.Int32(MarketType)).
     OrderBy(type => type.DisplayOrder).ToList();

There are four the number of data in the database, but the list returned is empty

Use the following form, you can return the correct data.

 var mtype = Convert.ToInt32(marketType);
 IList<Market> marketlist = marketlRep.Find<Market>(
 开发者_StackOverflow    type => type.MarketType == mtype).
     OrderBy(type => type.DisplayOrder).ToList();

Thank you!!

0

精彩评论

暂无评论...
验证码 换一张
取 消