EntityFrameworkCore.Jet icon indicating copy to clipboard operation
EntityFrameworkCore.Jet copied to clipboard

Change Tracking Disabled

Open sthompson32780 opened this issue 6 years ago • 2 comments

If you specify AsNoTracking on a query, it throws an error -

System.InvalidOperationException: 'variable 'materializationContext' of type 'Microsoft.EntityFrameworkCore.Storage.MaterializationContext' referenced from scope '', but it is not defined'

Example:

var list = (from e in context.Config select e).AsNoTracking().ToList();

sthompson32780 avatar Aug 14 '18 03:08 sthompson32780

I could reproduce the problem with EF 2.1.0. It seems to be an EF 2.1.0 bug now closed. https://github.com/aspnet/EntityFrameworkCore/issues/11689 Could you confirm that with EF 2.1.1 works?

bubibubi avatar Aug 18 '18 06:08 bubibubi

Still occurring on the 2.1.2 release when returning a list -

System.InvalidOperationException: 'variable 'materializationContext' of type 'Microsoft.EntityFrameworkCore.Storage.MaterializationContext' referenced from scope '', but it is not defined'

Note: I do not get this error when I use Sqlite provider.

sthompson32780 avatar Aug 22 '18 21:08 sthompson32780