コード例 #1
0
 /// <summary>
 /// Gets all entities using the Query Expression
 /// </summary>
 /// <typeparam name="T">Type of Entity List to return</typeparam>
 /// <param name="service">The service.</param>
 /// <param name="qe">Query Expression to Execute.</param>
 /// <param name="maxCount">The maximum number of entities to retrieve.  Use null for default.</param>
 /// <param name="pageSize">Number of records to return in each fetch.  Use null for default.</param>
 /// <returns></returns>
 public static IEnumerable <T> GetAllEntities <T>(this IOrganizationService service, TypedQueryExpression <T> qe, int?maxCount = null, int?pageSize = null)
     where T : Entity
 {
     return(RetrieveAllEntities <T> .GetAllEntities(service, qe, maxCount, pageSize));
 }
コード例 #2
0
 /// <summary>
 /// Gets all Active Entities (with the given subset of columns only)
 /// where the values are in the columnName
 /// </summary>
 /// <typeparam name="T">Type of Entity List to return.</typeparam>
 /// <param name="service"></param>
 /// <param name="columnSet">Columns to Return.</param>
 /// <param name="columnName">The name of the column to perform the in against.</param>
 /// <param name="values">The list of values to search for being in the column name.</param>
 /// <returns></returns>
 public static IEnumerable <T> GetAllEntitiesIn <T>(this IOrganizationService service, ColumnSet columnSet,
                                                    string columnName, params object[] values) where T : Entity
 {
     return(RetrieveAllEntities <T> .GetAllEntities(service, QueryExpressionFactory.CreateIn <T>(columnSet, columnName, values)));
 }