I have two linq queries. I want to use result of one query in another query.
var t2s = (from temp3 in _ent.Products where temp3.Row_Num == 2 select new { temp3.ProductID }); Then I use this var in another query:
var _query = (from P1 in _ent.brands join temp2 in on new { Produ_ID = (Int32?)P1.Prod_ID } equals new { Produ_ID = (Int32?)temp2.ProductID } ); When I run the first query by itself it gives me the right result. If I run the second one without a join it gives me right result, but with a join gives me the following error:
error: Unable to create a constant value of type 'Anonymous type'. Only primitive types ('such as Int32, String, and Guid') are supported in this context
t2sin second query?