Showing posts with label entity-framework-core. Show all posts
Showing posts with label entity-framework-core. Show all posts

Wednesday, January 25, 2017

Catch these things in EF Core

            var b = _context.Tasks.Include(j => j.TaskItems).Include(j => j.Creator);

TaskItems is an ICollection in Task object, hence it'll execute separately in SQL Server. Since Creator is a 1 to 1 mapping, It'll do a inner join with Task.


            var a = _context.Tasks.Include(j => j.TaskItems).ThenInclude(j => j.Status);

First tasks will be queried. Then in another query, TaskItems will be left joined with Workflow status. To map with Tasks, Where query will be appended with Exists, which will map Tasks and TaskItems


Powered by Blogger.


Software Architect at Surge Global/ Certified Scrum Master

Experienced in Product Design, Software Engineering, Team management and Practicing Agile methodologies.

Search This Blog

Facebook