0

I hope someone can help me

I have a procedure that return a object like this {idLayer, name}

And I'm calling it like this way:

var idLayers = db.GetLayerSon(store.idLayer).Select(x => x.idLayer);

then I'm trying to make something like this:

var idGroup = 
from tcGroup in db.TC_Group
join layers in idLayers
on tcGroup.idLayer equals layers.idLayer 

But it not work. What is the correct form to make this?

Regards!

Johnatan De Leon
  • 156
  • 1
  • 10
  • 1
    When using the query syntax you have to include a `select` at the end – juharr Oct 08 '20 at 18:08
  • check out the answer to this question: https://stackoverflow.com/questions/37324/what-is-the-syntax-for-an-inner-join-in-linq-to-sql – Tom Oct 08 '20 at 18:09
  • I removed the select at the end but i ge the next error {"Unable to create a constant value of type 'AforoByHour.Models.GetLayerSon_Result'. Only primitive types or enumeration types are supported in this context."} – Johnatan De Leon Oct 08 '20 at 18:22
  • "I have this LINQ statement, but it doesn't do what I want." We can't help you if you don't tell us what you want. – Harald Coppoolse Oct 14 '20 at 19:30

0 Answers0