Using Entity Framework DbSet Local
A DbSet in an Entity Framework DbContext has a Local property that let us access entities already retrieved within the scope of the DbContext. This way it is possible to further query a local entity set, without sending a query to the database. More…