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");
精彩评论