Fetching complex objects by raw SQL query in Entity Framework
I would like to fetch from database complex object using single query. Let's look at the following example: SELECT TableA.*, TableB.* FROM TableA INNER JOIN TableA.B_Id = TableB.Id and corresponding classes: public class QueryResult { public TableA A { get; set; } public TableB B { get; set; } } public class TableA { public int Id { get; set; } public string SomeContentA { get; set; } public int B_Id { get; set; } } public class TableB { public int Id { get; set; } public int SomeContentB { get; set; } } I would like to execute the raw SQL query from above against the database and get