IEnumerable <T> IQueryExecutor.ExecuteCollection <T>(QueryModel queryModel) { Tenant.EnsureStorageExists(queryModel.SourceType()); var handler = new LinqQuery <T>(Store, queryModel, _includes.ToArray(), Statistics).ToList(); return(Connection.Fetch(handler, IdentityMap.ForQuery(), Statistics, Tenant)); }
T IQueryExecutor.ExecuteScalar <T>(QueryModel queryModel) { var handler = Schema.HandlerFactory.HandlerForScalarQuery <T>(queryModel, Includes.ToArray(), Statistics); if (handler == null) { throw new NotSupportedException("Not yet supporting these results: " + queryModel.AllResultOperators().Select(x => x.GetType().Name).Join(", ")); } return(Connection.Fetch(handler, IdentityMap.ForQuery(), Statistics)); }
T IQueryExecutor.ExecuteSingle <T>(QueryModel queryModel, bool returnDefaultWhenEmpty) { var handler = Store.HandlerFactory.HandlerForSingleQuery <T>(queryModel, _includes.ToArray(), Statistics, returnDefaultWhenEmpty); if (handler == null) { throw new NotSupportedException("Not yet supporting these results: " + queryModel.AllResultOperators().Select(x => x.GetType().Name).Join(", ")); } return(Connection.Fetch(handler, IdentityMap.ForQuery(), Statistics, Tenant)); }