亚音速虫子? ExpressionVisitor linq

发布于 2024-09-17 08:31:03 字数 540 浏览 2 评论 0原文

我这个subsonic3.0.0.4的find语句有问题:

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

数据库中有4条数据,但返回的列表为空

使用下面的形式,可以返回正确的数据。

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

谢谢你!!

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>(
     type => type.MarketType == mtype).
     OrderBy(type => type.DisplayOrder).ToList();

Thank you!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文