TryGetObjectQuery - Object reference not set to an instance of an object.

Jun 9, 2016 at 5:11 PM
I am getting a lot of "Object reference not set to an instance of an object." errors. the error is happening inside of EFCache.QueryableExtensions.TryGetObjectQuery

My DB query is like so..

db.CarPartRestrictions.NotCached().ToList();

here is the error info:

[NullReferenceException: Object reference not set to an instance of an object.]
EFCache.QueryableExtensions.TryGetObjectQuery(IQueryable1 source) +96
EFCache.QueryableExtensions.NotCached(IQueryable
1 source) +64
Jun 13, 2016 at 8:49 PM
Looks like db.CarPartRestrictions you pass is null.