read-only
scenarioquicker to execute
because there is no need to setup change
tracking informationExample :
using (var context = new BookContext())
{
var books = context.Books.AsNoTracking().ToList();
}
With EF Core 1.0 you are also able to change the default tracking behavior at the context instance
level.
Example :
using (var context = new BookContext())
{
context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
var books = context.Books.ToList();
}