I am getting the following error:
An expression of type XXXX is not allowed in a subsequent from clause in a query expression with source type 'System.Linq.IQueryable<XXXX>'. Type inference failed in the call to 'SelectMany'
I am extremely new to LINQ. I have been using SQL queries with the Open Access SQL API which has been working great. But I want to learn to use LINQ so I a researching and forcing myself to do this.
I found the following articles which describes how LINQ handles relationships between tables. This is where I was struggling the most and this article does a great job of explaining it. http://msdn.microsoft.com/en-us/library/bb386932.aspx
So I am trying to duplicate this, but using OpenAccess ORM.
So this is my query:
var idQuery = from u
where u.CredentialsID == 0
u.UserGroups is throwing the error. Intelisense shows me the UserGroups object but doesn’t like something I am doing… Would someone be able to help me identifying what is causing this error please…
Thanks in advance.