I am developing an application in WCF. I have created a service and I need to implement a method that returns a list from a query to the Entity Framework by joining several tables with joins. I do not know if I'm doing well
This is the code:
public List<Object> GetPhones()
{
var ge = new gesphoneEntities();
var phones = from ph in ge.tbl_phones
join phm in ge.tbl_phone_models on ph.tbl_phone_model_id equals phm.ID
join phf in ge.tbl_phone_fabricants on phm.tbl_phone_model_fabricant_id equals phf.ID
select new object() { id = ph.ID, model = phm.Name };
return (List<Object>)phones;
}
And the error that gives me is this.