本系列原创博客代码已在EntityFramework6.0.0测试通过,转载请标明出处 有时候我们要通过IQueryable获取所在的DbContext信息,这是完全可以的. 以下代码从个人开源框架中抽取而出 using System; using System.Data.Entity; using System.Data.Entity.Core.Objects; using System.Data.Entity.Infrastructure; using System.Data.Entity.