((IObjectContextAdapter)ctx).ObjectContext.CreateQuery<EntityClass>(eSql); 转载于:https://www.cnblogs.com/wiseant/archive/2011/07/14/2106361.html