Как объединить таблицы в EF LINQ

Когда я пытаюсь объединить таблицы

var query =
    from foo in db.Foos
    from bar in db.Bars
    where foo.ID == bar.FooID
    where foo.ID == 45
    select bar;


query.toArray()

, я получаю такую ​​ошибку

Unable to create a constant value of type 'Bar'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.
12
задан alex2k8 25 February 2011 в 00:15
поделиться