开发者

lambda expression for OR condition in Linq to entity

I have the following condition. VersionNumber == versionID + ".pdf" OR VersionNumber ==开发者_如何学运维 versionID + ".null"

This is not taking this way

var versionExisting = entities.Documents.Where(d => d.VersionNumber == versionID + ".pdf" || d => d.VersionNumber == versionID + ".null");


Do this:

var versionExisting = entities.Documents.Where(d => d.VersionNumber == versionID + ".pdf" || d.VersionNumber == versionID + ".null");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜