Reputation: 97
I have a promblem with Linq-To-Sql
Type inference failed in the call to 'Join'
var conditionsFound = (from QuantiReports.Data.RoomInspectionGuid test in tests
where test.roomfloorid == obj.floorroomId
join testItem in testItems //This join statement has an error
on new { roomItemId = obj.roomitemId, testId = test.id } equals new { roomItemId = testItem.roomitemid.Value, testId = testItem.roominspectionid }
join testsCondition in testsConditions
on new { conditionId = condition.id, testitemId = testItem.id } equals new { conditionId = testsCondition.conditionId, testitemId = testsCondition.roomItemInspectionId }
select testsCondition).Count();
Upvotes: 0
Views: 2018
Reputation: 54
Apart from syntax , can you check in second join expression "on new { conditionId = condition.id". Check if type "condition" is defined or not.
Upvotes: 1