//public M New<M, IdType>() where M : Modl<M, IdType>, new() //{ // return Modl<M, IdType>.New(this); //} //public M Get<M, IdType>(IdType id, bool throwExceptionOnNotFound = true) where M : Modl<M, IdType>, new() //{ // return Modl<M, IdType>.Get(id, this, throwExceptionOnNotFound); //} //public bool Exists<M, IdType>(IdType id) where M : Modl<M, IdType>, new() //{ // return Modl<M, IdType>.Exists(id, this); //} //public IQueryable<M> Query<M, IdType>() where M : Modl<M, IdType>, new() //{ // return Modl<M, IdType>.Query(this); // //return new LinqQuery<M, IdType>(this); //} //public IQueryable<M> Query<M>() where M : Modl<M>, new() //{ // return Modl<M>.Query(this); // //return new LinqQuery<M, IdType>(this); //} //IQueryable<T> IQueryProvider.CreateQuery<T>(System.Linq.Expressions.Expression expression) //{ // return new LinqQuery<T>(this, expression); //} //IQueryable IQueryProvider.CreateQuery(System.Linq.Expressions.Expression expression) //{ // throw new NotImplementedException(); //} //T IQueryProvider.Execute<T>(System.Linq.Expressions.Expression expression) //{ // //var select = new Select<T>(this, expression); // return (T)this.Execute(expression); //} //object IQueryProvider.Execute(System.Linq.Expressions.Expression expression) //{ // //return this.Execute(expression); // throw new NotImplementedException(); //} //object Execute(Expression expression) //{ // //Type elementType = TypeSystem.GetElementType(expression.Type); // //var method = expression.Type.GetMethods(BindingFlags.Static | BindingFlags.FlattenHierarchy | BindingFlags.Public).Single(x => x.Name == "Get" && x.GetParameters().Count() == 2); // //return method.Invoke(null, new object[] { Convert.ToInt32(value.AttemptedValue), true }); // //return Activator.CreateInstance(typeof(Modl<>).MakeGenericType(expression.Type), BindingFlags.Instance | BindingFlags.NonPublic, null, new object[] { reader }, null); //} public static void DisposeAll() { AsyncDbAccess.DisposeAllWorkers(); CacheConfig.Clear(); }