private QQuery NewQuery(ClassMetadata classMetadata) { QQuery query = (QQuery)LocalContainer().Query(); query.Constrain(classMetadata); return(query); }
public IList <ElementType> Query <ElementType>(Transaction trans, Type extent, IComparer <ElementType> comparer) { lock (Lock()) { trans = CheckTransaction(trans); QQuery query = (QQuery)Query(trans); query.Constrain(extent); if (null != comparer) { query.SortBy(new GenericComparerAdaptor <ElementType>(comparer)); } IQueryResult queryResult = query.GetQueryResult(); return(new GenericObjectSetFacade <ElementType>(queryResult)); } }