c# - Returning multiple related entity types from raw SQL queries in Entity Framework -
noodling around raw sql queries in entity framework. right in thinking given these 2 related ef classes: public partial class campaign { public int campaignid { get; set; } public virtual icollection<quote> quotes { get; set; } } public partial class quote { public int quoteid { get; set; } public int campaignid { get; set; } public virtual campaign campaign { get; set; } } the tables joined foreign key, , objects generated db first entity framework. i can't issue raw query campaigns , related quotes? i've tried this: string sqlquery = "select * campaign c join quote q on q.campaignid = c.campaignid"; var meh = entities.database.sqlquery<campaign>(sqlquery); which brings campaigns without quotes. i'm guessing it's not feasible wanted check i'm not doing wrong? i couldn't find definitive answer in documentation. , older related question fetching complex objects raw sql query in entity framework has