Ladislav is entirely correct. However, because you clearly want a response to the second half of your query, here is how you may utilize Assign. But EF won't support this....using System;
static class Program
static void Main()
Use of the join syntax is optional. Predicate addition in a...where...
has the same impact as clause, and you can include additional conditions:...var query = (from RR in context.TableOne
from M in context.TableTwo
where RR.OrderedProductId == M.ProductID
|| RR.SoldProductId == M.ProductID // Your join
You invoke the method QueryableExtensions with the include method. The expression is converted into a string path using the function Include(source, path1).
The include technique does the following:...public static IQueryable<T> Include<T, TProperty>(this IQueryable<T> source, Expression<Func<T, TProperty>> path)
Later, I discovered the problem. In my WebAPIconfig.cs file, I had modified the configFormatter as follows:... config.Formatters.Remove(config.Formatters.XmlFormatter);
...The LINQ query worked as anticipated once I deleted it. I hope it may someday be useful to someone else!