Syncfusion.Linq.Base ICollectionViewAdv is an extended interface from ICollectionView that implements support for Grouping structure, Summaries, Table Summaries, Filters. CollectionViewAdv is an abstract class that implements ICollectionViewAdv and implements most of the basic details. ICollectionViewAdv is an extended interface from ICollectionView that implements support for Grouping structure, Summaries, Table Summaries, Filters. Raises the event. The instance containing the event data. Adds the listener. The collection view. Creates the record entry. The data. Gets the property access provider. Gets the item properties. Enable customization for runtime dynamic objects in LINQ queries. Suspends this instance. Resumes this instance. Refresh toplevel groups --Added for the fix SD8300. Gets the records list structure. The records. Gets the top level group. The top level group. Gets or sets the caption summary row. The caption summary row. Gets the relations. The relations. Gets the summary rows. The summary rows. Gets or sets the filter predicates. The filter predicates. Gets the table summary rows. The table summary rows. Gets the sort comparers for the sort description. Defines the custom group comparer to enable customization of the group sort order. Gets the state of the edit item. The state of the edit item. Gets the state of the current edit item. The state of the current edit item. Record Property Changed event handler Enable groupe expand state persistance. This will affect performance if there are large number of groups. Gets or sets a value indicating whether this instance is groups expanded. true if this instance is groups expanded; otherwise, false. Returns an Expression to embed in LINQ operation queries implemented by . Custom Functor to enable runtime customized objects over default operations other than LINQ queries. Custom Functor to enable runtime customized objects over default operations other than LINQ queries. Custom expression functor to enable runtime customized objects into LINQ queries. Custom expression functor to enable runtime customized objects into LINQ queries. Check whether the filter is applied or not. Initializes a new instance of the class. The source. Updates the collection view by handling the NotifyCollectionChangedEventArgs if there is no grouping. The sender. The instance containing the event data. Creates the item properties provider. Override this method to have return custom and have customizations. Releases unmanaged resources and performs other cleanup operations before the is reclaimed by garbage collection. Adds the listener to an external ICollectionView. It will add set the ExternalCollectionView Propety n Wires the CurrentChanged event The externalcollectionview. Call this method in the derived CollectionView once the constructor is called. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Ensures the records are initialized properly. Receives events from the centralized event manager. The type of the calling this method. Object that originated the event. Event data. true if the listener handled the event. It is considered an error by the handling in WPF to register a listener for an event that the listener does not handle. Regardless, the method should return false if it receives an event that it does not recognize or handle. Raises the event. The instance containing the event data. Creates the records. Returns a value that indicates whether a given item belongs to this collection view. The object to check. true if the item belongs to this collection view; otherwise, false. Gets the item at. The index. Indexes the of. The record. Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh. An object that you can use to dispose of the calling object. Passeses the filter. The item. Gets the group result. The group by. Called when the TopLevelGroup is populated with groups and records. The top level group. Creates the top level group. Gets a value that indicates whether the of the view is beyond the end of the collection. Returns true if the of the view is beyond the end of the collection; otherwise, false. Returns a value that indicates whether the resulting view is empty. true if the resulting view is empty; otherwise, false. Sets the current item. The new item. The new position. Sets the current item. The new item. The new position. The count. Sets the specified item to be the in the view. The item to set as the . true if the resulting is within the view; otherwise, false. Sets the first item in the view as the . true if the resulting is an item within the view; otherwise, false. Sets the last item in the view as the . true if the resulting is an item within the view; otherwise, false. Sets the item after the in the view as the . true if the resulting is an item within the view; otherwise, false. Sets the item at the specified index to be the in the view. The index to set the to. true if the resulting is an item within the view; otherwise, false. Sets the item before the in the view as the . true if the resulting is an item within the view; otherwise, false. Recreates the view. If the current view is in defer mode, the flags for refresh is set, otherwise it refreshes the view. Override this method to modify actions during refresh. Processes the collection during editing process. The instance containing the event data. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Suspends the events. Resumes the events. Raises the collection changed event. The instance containing the event data. Refreshes the filters. Refreshes the sort. Adds a new item to the collection. The new item that is added to the collection. Raises the event. The instance containing the event data. Ends the edit transaction and discards any pending changes to the item. Ends the edit transaction and discards the editing item changes Ends the add transaction and discards the pending new item. Cancels the new item in view. Ends the edit transaction and saves the pending changes. Ends the add transaction and saves the pending new item. Begins an edit transaction of the specified item. The item to edit. Removes the specified item from the collection. The record to remove. Removes the item at the specified position from the collection. The position of the item to remove. Raises the event. The instance containing the event data. Gets the expression func for complex data sources. Name of the property. Gets the item properties. Signals the object that initialization is starting. Signals the object that initialization is complete. Gets the property access provider. Creates the record entry. The data. Gets or sets the Dispatcher of the UI object associated with this CollectionViewAdv. Gets the item properties. The item properties. Gets or sets the external collection view. The external collection view. Gets the records list structure. The records. Gets a value that indicates whether this view supports filtering via the property. true if this view support filtering; otherwise, false. Gets a value that indicates whether this view supports grouping via the property. true if this view supports grouping; otherwise, false. Gets a value that indicates whether this view supports sorting via the property. true if this view supports sorting; otherwise, false. Gets the count. The count. Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting. The culture to use during sorting. When implementing this interface, raise this event after the current item has been changed. When implementing this interface, raise this event before changing the current item. Event handler can cancel this event. Gets the current item in the view. The current item of the view or null if there is no current item. Gets the ordinal position of the within the view. The ordinal position of the within the view. Gets or sets a callback used to determine if an item is suitable for inclusion in the view. A method used to determine if an item is suitable for inclusion in the view. Gets a value indicating whether this instance is grouping. true if this instance is grouping; otherwise, false. Gets a collection of objects that describe how the items in the collection are grouped in the view. A collection of objects that describe how the items in the collection are grouped in the view. Gets the TopLevelGroup as . The group list. Gets the top level group. The top level group. Gets the top-level groups. A read-only collection of the top-level groups or null if there are no groups. Gets a value that indicates whether the of the view is beyond the end of the collection. Returns true if the of the view is beyond the end of the collection; otherwise, false. Gets a value that indicates whether the of the view is beyond the beginning of the collection. Returns true if the of the view is beyond the beginning of the collection; otherwise, false. Gets a value indicating whether this instance is current in sync. true if this instance is current in sync; otherwise, false. Gets a value indicating whether this instance is refresh deferred. true if this instance is refresh deferred; otherwise, false. Gets a collection of objects that describe how the items in the collection are sorted in the view. A collection of objects that describe how the items in the collection are sorted in the view. Returns the underlying collection. An object that is the underlying collection. Gets a value indicating whether this instance is legacy data table. true if this instance is legacy data table; otherwise, false. Gets the value if the editing mode is in suspend state. Use this variable for listening changes in other source list changes. Gets a value indicating whether this instance is in end defer. true if this instance is in end defer; otherwise, false. This property used to find out the paging is enabled This property used to find out the Paging is ViewLevel or sourcelevel This property hold the PagedCollectionView object Gets a value that indicates whether a new item can be added to the collection. true if a new item can be added to the collection; otherwise, false. Gets a value that indicates whether the editing of an item can be canceled. true if editing an item can be canceled; otherwise, false. Gets a value that indicates whether an item can be removed from the collection. true if an item can be removed from the collection; otherwise, false. Gets the item that is being added during the current add transaction. The item that is being added if is true; otherwise, null. Gets the item in the collection that is being edited. The item in the collection that is being edited if is true; otherwise, null. Gets the state of the edit item. The state of the edit item. Gets a value that indicates whether an add transaction is in progress. true if an add transaction is in progress; otherwise, false. Gets or Sets when Items property changed Gets or Sets when Sorting is Enabled or Disabled. Gets a value that indicates whether an edit transaction is in progress. true if an edit transaction is in progress; otherwise, false. Gets or sets the position of the new item placeholder in the collection. One of the enumeration values that specifies the position of the new item placeholder in the collection. Occurs when a property value changes. Gets a value indicating whether [uses local array]. true if [uses local array]; otherwise, false. Gets / sets Gets or sets a value indicating whether this instance is groups expanded. true if this instance is groups expanded; otherwise, false. Gets or sets the caption summary row. The caption summary row. Gets the table summary rows. The table summary rows. Gets the summary rows. The summary rows. Gets or sets the filter predicates. The filter predicates. Gets the relations. The relations. Gets a value indicating whether this instance is dynamic bound. true if this instance is dynamic bound; otherwise, false. Defines the custom group comparer. This will work only when the grouped column is also sorted. Specifies a state while editing items Sorting Enabled always Sorting Disabled when cell value is edited Sorting Disabled when cell property value changed Exposes method to Get/Set from the underlying object. Gets the value. The record. Name of the prop. Sets the value. The record. Name of the prop. The value. Extended CollectionViewAdv to handle DataTable / DataView sources. Initializes a new instance of the class. The source. Updates the collection view by handling the NotifyCollectionChangedEventArgs if there is no grouping. The sender. The instance containing the event data. Raises the event. The instance containing the event data. Refreshes the sort. Refreshes the sorting order for bottom level. The groups. Creates the records. Gets the group result. The group by. Refreshes the filters. Gets or sets the view source. The view source. Holds values for Filtering. Initializes a new instance of the class. Gets or sets the type of the filter. The type of the filter. Gets or sets the filter value. The filter value. Gets or sets the type of the predicate. The type of the predicate. Gets or sets the type of the filterbehavior. The type of the predicate. Gets or sets a value indicating whether this instance is case sensitive. true if this instance is case sensitive; otherwise, false. Predicate type defined for Filters. Does an AND operation on filters. Does an OR operation on filters. Default Filter Operator is defined for Filters. Does an Equals operation on filters. Does an StartsWith operation on filters. Does an Contains operation on filters. Interface that exposes method to the TopLevelGroup for Add / Remove / Contains / IndexOf methods with the underlying bound object. This interface will only interact with the underlying bound object that can be found in RecordEntry.Data. Adds the specified record. The record. Insert the record in the specified position. The record. Removes the specified record. The record. if set to true [is in source collection change]. Determines whether the record is found in the DisplayElements of the TopLevelGroup. The record. true if [contains] [the specified record]; otherwise, false. Finds the index of the record. The record. Initializes a new instance of the class. The group. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Determines the index of a specific item in the . The object to locate in the . The index of if found in the list; otherwise, -1. Inserts an item to the at the specified index. The zero-based index at which should be inserted. The object to insert into the . is not a valid index in the . The is read-only. Removes the item at the specified index. The zero-based index of the item to remove. is not a valid index in the . The is read-only. Adds the specified item. The item. Adds an item to the . The object to add to the . The is read-only. Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. is null. is less than 0. is multidimensional. -or- is equal to or greater than the length of . -or- The number of elements in the source is greater than the available space from to the end of the destination . -or- Type cannot be cast automatically to the type of the destination . Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . The is read-only. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets or sets the top level group. The top level group. Gets or sets the at the specified index. Gets the number of elements contained in the . The number of elements contained in the . Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. GroupEntry contains the list of groups for each sub-groups populated for the class. NodeEntry is the base class for the Grouping data structure used by interface. It exposes some base level details for the derived constructs to use. Initializes a new instance of the class. The node. The level. Releases unmanaged resources and performs other cleanup operations before the is reclaimed by garbage collection. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets or sets the level. The level. Gets or sets the parent. The parent. Gets or sets a value indicating whether this instance is groups. true if this instance is groups; otherwise, false. Gets or sets a value indicating whether this instance is records. true if this instance is records; otherwise, false. Initializes a new instance of the class. The parent. The level. returns an array of SummaryDetails for each group. Gets or sets the groups. The groups. Initializes a new instance of the class. The parent. The level. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Called when group.IsExpanded = true;. Called when group.IsExpanded = false;. Populates the specified groups to populate. The groups to populate. Populates the specified groups to populate for the paging. The groups to populate. Populates the specified groups to populate. The groups to populate. The groups. The parent. The level. Populates the specified groups to populate for paging. The groups to populate. The groups. The parent. The level. PagedSource IsViewLevelPaging Creates the new group. The parent. The group result. The level. Creates the new group. The parent. The key. The level. Creates the details for records. The parent. The level. Creates the details for records. The parent. The source. The level. Creates the details for groups. The level. Sets the dirty. When this is set to true, the YAmountCache will be re-computed for the whole group structure. Each group knows the exact height of its child nodes. The YAmountCache returns the y height of each group based on its inner node levels.and their expanded states Calculated YAmount Gets the source Y amount cache. Gets the parent Y amount cache. Gets the record count. Gets the groups count. Gets the relations count. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets or sets the parent. The parent. Gets or sets the key for the Group. The key. Gets the items count. The items count. Gets or sets a value indicating whether this instance is expanded. true if this instance is expanded; otherwise, false. Gets or sets a value indicating whether this instance is bottom level. Bottom-Level group will have the list of records for the Group. true if this instance is bottom level; otherwise, false. Gets a value indicating whether this instance is top level group. Top-Level Group will be the first-level group. true if this instance is top level group; otherwise, false. Gets or sets the details for this group. This could be Groups / Records collection. The details. Gets the records when Group.Details is list of records. The records. Gets the source. The source. Gets the groups when Group.Details is list of Groups. The groups. Occurs when [property changed]. Contains summary record for this group IComparer implemented for class. Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. The first object to compare. The second object to compare. Value Condition Less than zero is less than . Zero equals . Greater than zero is greater than . Initializes a new instance of the class. The group. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. The collection was modified after the enumerator was created. Sets the enumerator to its initial position, which is before the first element in the collection. The collection was modified after the enumerator was created. Gets or sets the group. The group. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Enumerates any class and lists out all the elements in a one-dimensional array. Initializes a new instance of the class. The group. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. The collection was modified after the enumerator was created. Sets the enumerator to its initial position, which is before the first element in the collection. The collection was modified after the enumerator was created. Gets or sets the group. The group. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Extensions for class. Expands all groups at the specified level. The group. The level. Collapses all groups at the specified level. The group. The level. Expands all groups. The group. Collapses all groups. The group. Gets the top level group. The entry. Contains a list of records with its related summaries and unfiltered records. The class uses GroupRecordEntry if the group.IsBottomLevel = true;. Initializes a new instance of the class. The parent. The level. Initializes a new instance of the class. The parent. The level. The source. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Populates the records. The source. The filter predicate. This overload Method used to find the GroupRecords for paging Support Creates the record. The data. Gets the records count. Gets the relations count. returns the underlying objects array from the record entries. Gets the unfiltered records. The unfiltered records. Gets or sets the records. The records. Gets the summaries for the bottom level records. The summaries. Contains a list of nested records for each and nested instance. Initializes a new instance of the class. The parent. The level. Gets or sets the nested level. The nested level. Gets or sets the view. The view. Gets the nested records. The nested records. Contains the underlying business object bound to instance. Nested records can be specified / controlled using the PopulateChildView method. Initializes a new instance of the class. The parent. The level. The data. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Called when RecordEntry.IsExpanded = true; Called when RecordEntry.IsExpanded = false; Sets IsExpanded = false without any calls to the events or overrides. Populates the child view. The collection view. The level. Name of the relation. Called when [collapsed]. Gets or sets the data. The data. Gets or sets a value indicating whether this instance is expanded. true if this instance is expanded; otherwise, false. Gets or sets the child views. The child views. Finds the location of item. The item. Contains the list of Summary aggregates computed using instance in this class. Initializes a new instance of the class. The parent. The level. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the summary values. The summary values. Gets or sets the summary row. The summary row. Instance to cache the summary aggregate values into the instance. Initializes a new instance of the class. Gets or sets the name. The name. Gets or sets the aggregate values. The aggregate values. Common properties exposed through ISummaryRow for getting information on the summary values to be computed for the Groups in . Gets or sets a value indicating whether this instance is visible. true if this instance is visible; otherwise, false. Gets or sets the name. The name. Gets or sets a value indicating whether [show summary in row]. true if [show summary in row]; otherwise, false. Gets the summary columns. The summary columns. Gets or sets the title. The title. Gets or sets the title column count. The title column count. Gets or sets the custom aggregate. Should implement interface to delegate the custom summaries. The custom aggregate. Gets or sets the format. The format. Gets or sets the name of the mapping. The name of the mapping. Gets or sets the name. The name. Gets or sets the type of the summary. The type of the summary. Different Enum types of SummaryType. Specify the count aggregate for the . Specify Double value aggregate for the . Specify Int32 value aggregate for the . Specify custom aggregate for the . Implement or interface to delegate the summary computation. Implement this interface to delegate the summary computation. class GridDataInt32Aggregate : ISummaryAggregate { public GridDataInt32Aggregate() { } public int Sum { get; set; } public Action<IEnumerable, string, PropertyDescriptor> CalculateAggregateFunc() { return (items, property, pd) => { if (pd.Name == "Sum") this.Sum = Convert.ToInt32(items.AsQueryable().Sum(property)); }; } } Calculates the aggregate func. Implement this interface to delegate custom summary computation. This interface also extends summary computation for unbound values. internal class CountAggregate : ISummaryExpressionAggregate { public CountAggregate() { } public int Count { get; set; } #region ISummaryExpressionAggregate Members public Action<IEnumerable, string, Expression<Func<string, object, object>>, PropertyDescriptor> CalculateAggregateExpressionFunc() { return (items, property, expressionFunc, pd) => { if (pd.Name == "Count") { this.Count = items.AsQueryable().Count(); } }; } #endregion } Calculates the aggregate expression func. Implement this interface to know if the Summary expressions can use PLINQ Count, Minimum, Maximum, Sum, and Average for double fields. internal class GridDataTableCountAggregate : GridDataTableAggregator, ISummaryAggregate { public GridDataTableCountAggregate(DataTable table) : base(table) { } public int Count { get; set; } #region IGridDataSummaryAggregate Members public Action<IEnumerable, string, PropertyDescriptor> CalculateAggregateFunc() { return (items, property, pd) => { var table = this.GetClonedTable(items); if (pd.Name == "Count") { this.Count = (int)table.Compute(string.Format("Count({0})", property), string.Empty); } }; } #endregion } TopLevelGroup is the first-level of the Groups present in . It maintains the data structure for Grouping with . Iterate the DisplayElements property to get one-to-one mapping of the index with the TopLevelGroup items. Access all the Bottom-level and other nested level groups with the Groups property. Implement this interface to control refresh done with the class. Refreshes the sorting order. Refreshes the filters. returns an IDisposable object to specify controlled updates. Initializes a new instance of the class. The collection view. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Invalidates the specified index. The index. The count. Refreshes the sorting order. Refreshes the filters. Suspends the events. Resumes the events. returns an IDisposable object to specify controlled updates. Adds the specified record. The record. Removes the specified record. The record. if set to true [is in source collection change]. Resets the group. The record. Name of the property. Removes the record. The record. if set to true [is in source collection change]. Determines whether the record is found in the DisplayElements of the TopLevelGroup. The record. true if [contains] [the specified record]; otherwise, false. Finds the index of the record. The record. Resets the display elements. Gets the max level. Gets the group caption text for the specified . The group. The group specifier text. Gets the group caption text for the specified . The group. The group specifier text. Updates the caption summaries. Updates the summaries for the specified . The group. Determines whether [has details view]. true if [has details view]; otherwise, false. Gets a value indicating whether this instance is top level group. Top-Level Group will be the first-level group. true if this instance is top level group; otherwise, false. Gets or sets the relations count. The relations count. Gets the collection view. The collection view. Gets the group descriptions. The group descriptions. Gets the display elements. The display elements. Gets a value indicating whether this instance is legacy data table. true if this instance is legacy data table; otherwise, false. Occurs when the collection changes. ICollectionViewAdv helper extensions Converts the IEnumerable data source as a strongly typed generic source. The items source. Determines whether [is generic type] [the specified items source]. The items source. true if [is generic type] [the specified items source]; otherwise, false. Exposes events for flat IBindingList or INotifyCollectionChanged implemented data sources. Used by SourceListWrapper for wrapping up in a generic collection. Wires the collection changed handler. The notify collection changed source. Wires the list changed handler. The list source. Occurs when collection is changed. A generic wrapper for normal IBindingList / INotifyCollectionChanged interface. Initializes a new instance of the class. Wires the collection changed handler. The notify collection changed source. Wires the list changed handler. The list source. Occurs when collection is changed. Implements an IList structure to contain the list of RecordEntry. Returns the index for the underlying record. The data. Gets the item at index specified. Index of the record. Gets the for the underlying business object. The data. Creates the for the business object. The data. Dispose all items from the . Gets the table summaries. The table summaries. Implement this interface to instruct the QueryableCollectionView derived view for generating PLINQ query expression trees. Constructor that takes the target page index Index of the requested page Gets the index of the requested page Moves to the first page. Whether or not the move was successful. Moves to the last page. Whether or not the move was successful. Moves to the page after the current page we are on. Whether or not the move was successful. Moves to the page before the current page we are on. Whether or not the move was successful. Moves to page . The index of the page to which to move. Whether or not the move was successful. Raised when a page index change completed. Raised when a page index change is requested. Gets a value indicating whether the PageIndex value is allowed to change or not. Gets a value indicating whether a page index change is in process or not. Gets the number of known items in the view before paging is applied. Gets the current page we are on. (zero based) Gets or sets the number of items to display on a page. Gets the total number of items in the view before paging is applied, or -1 if that total number is unknown. Specifies properties for filtering with . Gets or sets the name of the mapping. The name of the mapping. Gets the filters. The filters. Specifies the relation type. Specifies Mater-Detail kind of relation. Specifies Foreign Key reference relation. Specifies the relation definition for the . Gets or sets the relational column. The relational column. Gets or sets the type of the relation. The type of the relation. Implements to Get / Set value on the underlying object. Gets the value. The record. Name of the prop. Sets the value. The record. Name of the prop. The value. PagedCollectionView view over an IEnumerable. Preview Since there's nothing in the un-cancelable event args that is mutable, just create one instance to be used universally. Value that we cache for the PageIndex if we are in a DeferRefresh, and the user has attempted to move to a different page. Value that we cache for the PageSize if we are in a DeferRefresh, and the user has attempted to change the PageSize. CultureInfo used in this PagedCollectionView Private accessor for the Monitor we use to prevent recursion Private accessor for the CurrentItem Private accessor for the CurrentPosition The number of requests to defer Refresh() The item we are currently editing Private accessor for the Filter Private accessor for the CollectionViewFlags Private accessor for the InternalList Keeps track of whether groups have been applied to the collection already or not. Note that this can still be set to false even though we specify a GroupDescription, as the collection may not have gone through the PrepareGroups function. ConstructorInfo obtained from reflection for generating new items Whether we have the correct ConstructorInfo information for the ItemConstructor The new item we are getting ready to add to the collection Private accessor for the PageIndex Private accessor for the PageSize Whether the source needs to poll for changes (if it did not implement INotifyCollectionChanged) Private accessor for the SortDescriptions Private accessor for the SourceCollection Timestamp used to see if there was a collection change while processing enumerator changes Private accessor for the TrackingEnumerator Helper constructor that sets default values for isDataSorted and isDataInGroupOrder. The source for the collection Initializes a new instance of the PagedCollectionView class. The source for the collection Determines whether the source is already sorted Whether the source is already in the correct order for grouping Add a new item to the underlying collection. Returns the new item. After calling AddNew and changing the new item as desired, either CommitNew or CancelNew" should be called to complete the transaction. The new item we are adding Complete the transaction started by . The pending changes (if any) to the item are discarded. Complete the transaction started by AddNew. The new item is removed from the collection. Complete the transaction started by . The pending changes (if any) to the item are committed. Complete the transaction started by AddNew. We follow the WPF convention in that the view's sort, filter, and paging specifications (if any) are applied to the new item. Return true if the item belongs to this view. No assumptions are made about the item. This method will behave similarly to IList.Contains(). If the caller knows that the item belongs to the underlying collection, it is more efficient to call PassesFilter. The item we are checking to see whether it is within the collection Boolean value of whether or not the collection contains the item Enter a Defer Cycle. Defer cycles are used to coalesce changes to the ICollectionView. IDisposable used to notify that we no longer need to defer, when we dispose Begins an editing transaction on the given item. The transaction is completed by calling either CommitEdit or CancelEdit. Any changes made to the item during the transaction are considered "pending", provided that the view supports the notion of "pending changes" for the given item. Item we want to edit Implementation of IEnumerable.GetEnumerator(). This provides a way to enumerate the members of the collection without changing the currency. IEnumerator for the collection Interface Implementation for GetEnumerator() IEnumerator that we get from our internal collection Retrieve item at the given zero-based index in this PagedCollectionView, after the source collection is filtered, sorted, and paged. Thrown if index is out of range Index of the item we want to retrieve Item at specified index Return the index where the given item appears, or -1 if doesn't appear. Item we are searching for Index of specified item Move to the given item. Item we want to move the currency to Whether the operation was successful Move to the first item. Whether the operation was successful Move to the last item. Whether the operation was successful Move to the next item. Whether the operation was successful Move CurrentItem to this index Position we want to move the currency to True if the resulting CurrentItem is an item within the view; otherwise False Move to the previous item. Whether the operation was successful Moves to the first page. Whether or not the move was successful. Moves to the last page. The move is only attempted when TotalItemCount is known. Whether or not the move was successful. Moves to the page after the current page we are on. Whether or not the move was successful. Requests a page move to page . Index of the target page Whether or not the move was successfully initiated. Moves to the page before the current page we are on. Whether or not the move was successful. Return true if the item belongs to this view. The item is assumed to belong to the underlying DataCollection; this method merely takes filters into account. It is commonly used during collection-changed notifications to determine if the added/removed item requires processing. Returns true if no filter is set on collection view. The item to compare against the Filter Whether the item passes the filter Re-create the view, using any SortDescriptions and/or Filters. Remove the given item from the underlying collection. It needs to be in the current filtered, sorted, and paged view to call this. Item we want to remove Remove the item at the given index from the underlying collection. The index is interpreted with respect to the view (filtered, sorted, and paged list). Index of the item we want to remove Helper for SortList to handle nested properties (e.g. Address.Street) parent object property names path property type that we want to check for child object Fix up CurrentPosition and CurrentItem after a collection change Item that we want to set currency to Index of item involved in the collection change Fix up CurrentPosition and CurrentItem after a collection change Item that we want to set currency to Index of item involved in the collection change Fix up CurrentPosition and CurrentItem after a collection change The index can be -1 if the item was removed from a previous page Index of item involved in the collection change Returns true if specified flag in flags is set. Flag we are checking for Whether the specified flag is set Called to complete the page move operation to set the current page index. Final page index Convert a value for the index passed in to the index it would be relative to the InternalIndex property. Index to convert Value for the InternalIndex Copy all items from the source collection to the internal list for processing. Common functionality used by CommitNew, CancelNew, and when the new item is removed by Remove or Refresh. Whether we canceled the add The new item we ended adding Subtracts from the deferLevel counter and calls Refresh() if there are no other defers Makes sure that the ItemConstructor is set for the correct type If the IEnumerable has changed, bring the collection up to date. (This isn't necessary if the IEnumerable is also INotifyCollectionChanged because we keep the collection in sync incrementally.) Helper function used to determine the type of an item Whether we should use a representative item The type of the items in the collection Gets a representative item from the collection An item that can represent the collection Return index of item in the internal list. The item we are checking Integer value on where in the InternalList the object is located Return item at the given index in the internal list. The index we are checking The item at the specified index Ask listeners (via ICollectionView.CurrentChanging event) if it's OK to change currency False if a listener cancels the change, True otherwise Notify listeners that this View has changed CollectionViews (and sub-classes) should take their filter/sort/grouping/paging into account before calling this method to forward CollectionChanged events. The NotifyCollectionChangedEventArgs to be passed to the EventHandler Raises the CurrentChanged event Raise a CurrentChanging event that is not cancelable. This is called by CollectionChanges (Add, Remove, and Refresh) that affect the CurrentItem. This CurrentChanging event cannot be canceled. Raises the CurrentChanging event CancelEventArgs used by the consumer of the event. args.Cancel will be true after this call if the CurrentItem should not be changed for any reason. This CurrentChanging event cannot be canceled. GroupBy changed handler CollectionViewGroup whose GroupBy has changed Arguments for the NotifyCollectionChanged event GroupDescription changed handler CollectionViewGroup whose GroupDescription has changed Arguments for the GroupDescriptionChanged event Raises a PropertyChanged event. PropertyChangedEventArgs for this change Helper to raise a PropertyChanged event. Property name for the property that changed Create, filter and sort the local index array. called from Refresh(), override in derived classes as needed. new IEnumerable to associate this view with new local array to use for this view Process an Add operation from an INotifyCollectionChanged event handler. Item added to the source collection Index item was added into Process CollectionChanged event on source collection that implements INotifyCollectionChanged. The NotifyCollectionChangedEventArgs to be processed. Process a Remove operation from an INotifyCollectionChanged event handler. Item removed from the source collection Whether this was part of a Replace operation Handles adding an item into the collection, and applying sorting, filtering, grouping, paging. Item to insert in the collection Index to insert item into Raises Currency Change events Whether to fire the CurrentChanged event even if the parameters have not changed CurrentItem before processing changes CurrentPosition before processing changes IsCurrentBeforeFirst before processing changes IsCurrentAfterLast before processing changes Raises the PageChanged event Raises the PageChanging event Index of the requested page True if the event is cancelled (e.Cancel was set to True), False otherwise Will call RefreshOverride and clear the NeedsRefresh flag Refresh, or mark that refresh is needed when defer cycle completes. Re-create the view, using any SortDescriptions. Also updates currency information. Set currency back to the previous value it had if possible. If the item is no longer in view then either use the first item in the view, or if the list is empty, use null. CurrentItem before processing changes IsCurrentBeforeFirst before processing changes IsCurrentAfterLast before processing changes Set CurrentItem and CurrentPosition, no questions asked! CollectionViews (and sub-classes) should use this method to update the Current values. New CurrentItem New CurrentPosition Set CurrentItem and CurrentPosition, no questions asked! This method can be called from a constructor - it does not call any virtuals. The 'count' parameter is substitute for the real Count, used only when newItem is null. In that case, this method sets IsCurrentAfterLast to true if and only if newPosition >= count. This distinguishes between a null belonging to the view and the dummy null when CurrentPosition is past the end. New CurrentItem New CurrentPosition Numbers of items in the collection Just move it. No argument check, no events, just move current to position. Position to move the current item to Sets the specified Flag(s) Flags we want to set Value we want to set these flags to Set new SortDescription collection; re-hook collection change notification handler SortDescriptionCollection to set the property value to SortDescription was added/removed, refresh PagedCollectionView Sender that triggered this handler NotifyCollectionChangedEventArgs for this change Sort the List based on the SortDescriptions property. List of objects to sort The sorted list Helper to validate that we are not in the middle of a DeferRefresh and throw if that is the case. Raise this event when the (filtered) view changes CollectionChanged event (per INotifyCollectionChanged). Raised when the CurrentItem property changed Raised when the CurrentItem property is changing Raised when a page index change completed Raised when a page index change is requested PropertyChanged event. PropertyChanged event (per INotifyPropertyChanged) Gets a value indicating whether the view supports AddNew. Gets a value indicating whether the view supports the notion of "pending changes" on the current edit item. This may vary, depending on the view and the particular item. For example, a view might return true if the current edit item implements IEditableObject, or if the view has special knowledge about the item that it can use to support rollback of pending changes. Gets a value indicating whether the PageIndex value is allowed to change or not. Gets a value indicating whether we support filtering with this ICollectionView. Gets a value indicating whether this view supports grouping. When this returns false, the rest of the interface is ignored. Gets a value indicating whether the view supports Remove and RemoveAt. Gets a value indicating whether we support sorting with this ICollectionView. Gets the number of records in the view after filtering, sorting, and paging. Gets or sets Culture to use during sorting. Gets the new item when an AddNew transaction is in progress Otherwise it returns null. Gets the affected item when an EditItem transaction is in progress Otherwise it returns null. Gets the "current item" for this view Gets the ordinal position of the CurrentItem within the (optionally sorted and filtered) view. Gets or sets the Filter, which is a callback set by the consumer of the ICollectionView and used by the implementation of the ICollectionView to determine if an item is suitable for inclusion in the view. Simpler implementations do not support filtering and will throw a NotSupportedException. Use property to test if filtering is supported before assigning a non-null value. Gets a value indicating whether an "AddNew" transaction is in progress. Gets a value indicating whether currency is beyond the end (End-Of-File). Whether IsCurrentAfterLast Gets a value indicating whether currency is before the beginning (Beginning-Of-File). Whether IsCurrentBeforeFirst Gets a value indicating whether an EditItem transaction is in progress. Gets a value indicating whether the resulting (filtered) view is empty. Gets a value indicating whether a page index change is in process or not. Gets the minimum number of items known to be in the source collection that verify the current filter if any Gets a value indicating whether this view needs to be refreshed. Gets or sets whether to include a placeholder for a new item, and if so, where to put it. Only the value NewItemPlaceholderPosition.None is supported. Gets the current page we are on. (zero based) Gets or sets the number of items to display on a page. If the PageSize = 0, then we are not paging, and will display all items in the collection. Otherwise, we will have separate pages for the items to display. Gets the Sort criteria to sort items in collection.

Clear a sort criteria by assigning SortDescription.Empty to this property. One or more sort criteria in form of can be used, each specifying a property and direction to sort by.

Simpler implementations do not support sorting and will throw a NotSupportedException. Use property to test if sorting is supported before adding to SortDescriptions.
Gets the source of the IEnumerable collection we are using for our view. Gets the total number of items in the view before paging is applied. Gets a value indicating whether we have a valid ItemConstructor of the correct type Gets the private count without taking paging or placeholders into account Gets the InternalList Gets a value indicating whether CurrentItem and CurrentPosition are up-to-date with the state and content of the collection. Gets a value indicating whether the current item is in the view Gets a value indicating whether or not we have grouping taking place in this collection. Gets a value indicating whether there is still an outstanding DeferRefresh in use. If at all possible, derived classes should not call Refresh if IsRefreshDeferred is true. Gets whether the current page is empty and we need to move to a previous page. Gets a value indicating whether we are on the last local page Gets the number of pages we currently have Gets the SourceCollection as an IList Gets Timestamp used by the NewItemAwareEnumerator to determine if a collection change has occurred since the enumerator began. (If so, MoveNext should throw.) Gets a value indicating whether a private copy of the data is needed for sorting, filtering, and paging. We want any deriving classes to also be able to access this value to see whether or not to use the default source collection, or the internal list. Return the item at the specified index Index of the item we want to retrieve The item at the specified index Delegate used to asynchronously trigger a page move. Requested page index Enum for CollectionViewFlags Whether the list of items (after applying the sort and filters, if any) is already in the correct order for grouping. Whether the source collection is already sorted according to the SortDescriptions collection Whether we should process the collection changed event Whether the current item is before the first Whether the current item is after the last Whether we need to refresh Whether we cache the IsEmpty value Indicates whether a page index change is in process or not Whether we need to move to another page after EndDefer Whether we need to update the PageSize after EndDefer Creates a comparer class that takes in a CultureInfo as a parameter, which it will use when comparing strings. Private accessor for the CultureInfo of our comparer Creates a comparer which will respect the CultureInfo that is passed in when comparing strings. The CultureInfo to use in string comparisons Compares two objects and returns a value indicating whether one is less than, equal to or greater than the other. first item to compare second item to compare Negative number if x is less than y, zero if equal, and a positive number if x is greater than y Compares the 2 items using the specified CultureInfo for string and using the default object comparer for all other objects. Used to keep track of Defer calls on the PagedCollectionView, which will prevent the user from calling Refresh() on the view. In order to allow refreshes again, the user will have to call IDisposable.Dispose, to end the Defer operation. Private reference to the CollectionView that created this DeferHelper Initializes a new instance of the DeferHelper class CollectionView that created this DeferHelper Cleanup method called when done using this class A simple monitor class to help prevent re-entrant calls Whether the monitor is entered Sets a value indicating that we have been entered Boolean value indicating whether we were already entered Cleanup method called when done using this class Gets a value indicating whether we have been entered or not IEnumerator generated using the new item taken into account Initializes a new instance of the NewItemAwareEnumerator class. The PagedCollectionView we are creating the enumerator for The baseEnumerator that we pass in The new item we are adding to the collection Implements the MoveNext function for IEnumerable Whether we can move to the next item Implements the Reset function for IEnumerable CollectionView that we are creating the enumerator for The Base Enumerator that we are passing in The position we are appending items to the enumerator Reference to any new item that we want to add to the collection Timestamp to let us know whether there have been updates to the collection Gets the Current value for IEnumerable Whether the position is before the new item Whether the position is on the new item that is being created Whether the position is after the new item IComparer class to sort by class property value (using reflection). Create a comparer, using the SortDescription and a Type; tries to find a reflection PropertyInfo for each property name CollectionView that contains list of property names and direction to sort by Compares two objects and returns a value indicating whether one is less than, equal to or greater than the other. first item to compare second item to compare Negative number if x is less than y, zero if equal, and a positive number if x is greater than y Compares the 2 items using the list of property names and directions. Steps through the given list using the comparer to find where to insert the specified item to maintain sorted order Item to insert into the list List where we want to insert the item Index where we should insert into Generate the Property Descriptot for corresponding Property it may be simple or complex property Extends CollectionViewAdv to implement LINQ based operations on strongly-typed data sources. Raises the event. The instance containing the event data. Refreshes the sort. Refreshes the sorting order for bottom level. The groups. Creates the records. Refreshes the filters. Gets the group result. The group by. Gets or sets a value indicating whether [use PLINQ]. true if [use PLINQ]; otherwise, false. Gets the underlying view source that holds the current collection in a separate IQueryable view. The view source. Implements interface to enumerate the records data structure for . Create a new instance of . The source. The view. Initializes a new instance of the class. The view. Initializes a new instance of the class. The source. The view. Populates the records from top level group. Creates the record. The data. Called when collection is changed. The sender. The instance containing the event data. Creates the record entry. The data. Adds the specified data. The data. Returns the index for the underlying record. The data. Gets the item at index specified. Index of the record. Gets the for the underlying business object. The data. Determines the index of a specific item in the . The object to locate in the . The index of if found in the list; otherwise, -1. Inserts an item to the at the specified index. The zero-based index at which should be inserted. The object to insert into the . is not a valid index in the . The is read-only. Removes the item at the specified index. The zero-based index of the item to remove. is not a valid index in the . The is read-only. Adds an item to the . The object to add to the . The is read-only. Removes all items from the . The is read-only. Dispose all items from the . Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. is null. is less than 0. is multidimensional. -or- is equal to or greater than the length of . -or- The number of elements in the source is greater than the available space from to the end of the destination . -or- Type cannot be cast automatically to the type of the destination . Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . The is read-only. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Gets the view. The view. Gets the table summaries. The table summaries. Gets or sets the at the specified index. Gets the number of elements contained in the . The number of elements contained in the . Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. Utility class for Type related operations Gets the default member name that is used for an indexer (e.g. "Item"). Type to check. Default member name. Retrieves the value and type of a property. That property can be nested and its path can include indexers. Each element of the path needs to be a public instance property. The parent Type Property path Potential exception Parent item which will be set to the property value if non-null. Extension method that returns the type of a property. That property can be nested and its path can include indexers. Each element of the path needs to be a public instance property. Type that exposes that property Property path Property type Retrieves the value of a property. That property can be nested and its path can include indexers. Each element of the path needs to be a public instance property. The return value will either be of type propertyType or it will be null. Object that exposes the property Property path Property type Potential exception Property value Returns the PropertyInfo for the specified property path. If the property path refers to an indexer (e.g. "[abc]"), then the index out parameter will be set to the value specified in the property path. This method only supports indexers with a single parameter that is either an int or a string. Int parameters take priority over string parameters. Type to search. Property path. Set to the index if return value is an indexer, otherwise null. PropertyInfo for either a property or an indexer. Returns the friendly name for a type The type to get the name from Textual representation of the input type Returns a list of substrings where each one represents a single property within a nested property path which may include indexers. For example, the string "abc.d[efg][h].ijk" would return the substrings: "abc", "d", "[efg]", "[h]", and "ijk". Path to split. List of property substrings. Insert [ wildcard ] in LIKE Queries. http://msdn.microsoft.com/en-us/library/ms179859.aspx Functional method extensions Creates the new instance constructor. The type. The full name. Type of the target. Iterates over an IEnumerable instance to a delegated function The items. The action. Iterates over a generic IEnumerable instance to a delegated function The items. The action. Iterates the index. The items. The action. Iterates the index. The items. The action. Trues this instance. Falses this instance. Ors the specified expr1. The expr1. The expr2. Ands the specified expr1. The expr1. The expr2. Folds the specified list. The list. The func. The acc. Folds the left. The list. The func. The acc. Folds the right. The list. The func. The acc. Moves to. The list. The SRC. The dest. Specifies the FilterType to be used in LINQ methods. Performs LessThan operation. Performs LessThan Or Equal operation. Checks Equals on the operands. Checks for Not Equals on the operands. Checks for Greater Than or Equal on the operands. Checks for Greater Than on the operands. Checks for StartsWith on the string operands. Checks for EndsWith on the string operands. Checks for Contains on the string operands. Returns invalid type Checks for Between two date on the operands. Specifies the Filter Behaviour for the filter predicates. Parses only StronglyTyped values. Parses all values by converting them as string. Gets the new instance of the ClassFactory class. A framework independent utility class for the new Nullable type in .NET Framework 2.0 Indicates whether the specified PropertyDescriptor has nested properties. The PropertyDescriptor to be checked. True if nested properties are found; False otherwise. Indicates whether the specified Type has nested properties. The Type to be checked. True if nested properties are found; False otherwise. Use this method instead of Convert.ChangeType. Makes Convert.ChangeType work with Nullable types. Use this method instead of Convert.ChangeType. Makes Convert.ChangeType work with Nullable types. Returns null if value is DBNull and specified type is a Nullable type. Otherwise the value is returned unchanged. Returns the underlying type of a Nullable type. For .NET 1.0 and 1.1 this method will always return null. provides conversion routines for values to convert them to another type and routines for formatting values. Converts value from one type to another using an optional . Converts value from one type to another using an optional . The original value. The target type. A used to format or parse the value. The new value in the target type. Converts value from one type to another using an optional . The original value. The target type. A used to format or parse the value. Indicates whether exceptions should be avoided or catched and return value should be DBNull if it cannot be converted to the target type. The new value in the target type. Tries the parse. The string value. The underline type. Converts value from one type to another using an optional . The original value. The target type. A used to format or parse the value. Format string. Indicates whether exceptions should be avoided or catched and return value should be DBNull if it cannot be converted to the target type. The new value in the target type. Overloaded. Parses the given text using the resultTypes "Parse" method or using a type converter. The text to parse. The requested result type. A used to format or parse the value. Can be NULL. The new value in the target type. Parses the given text using the resultTypes "Parse" method or using a type converter. The text to parse. The requested result type. A used to format or parse the value. Can be NULL. A format string used in a call. Right now format is only interpreted to enable roundtripping for formatted dates. The new value in the target type. Parse the given text using the resultTypes "Parse" method or using a type converter. The text to parse. The requested result type. A used to format or parse the value. Can be NULL. A format string used in a call. Right now format is only interpreted to enable roundtripping for formatted dates. Indicates whether DbNull should be returned if value cannot be parsed. Otherwise an exception is thrown. The new value in the target type. Parse the given text using the resultTypes "Parse" method or using a type converter. The text to parse. The requested result type. A used to format or parse the value. Can be NULL. A string array holding permissible formats used in a call. Right now formats is only interpreted to enable roundtripping for formatted dates. Indicates whether DbNull should be returned if value cannot be parsed. Otherwise an exception is thrown. The new value in the target type. Generates display text using the specified format, culture info and number format. The value to format. The value type on which formatting is based. The original value will first be converted to this type. The format like in ToString(string format). The for formatting the value. The for formatting the value. The string with the formatted text for the value. Returns a representative value for any given type. The . A value with the specified type. Overloaded. Parses the given string including type information. String can be in format %lt;type> 'value' Parses the given string including type information. String can be in format %lt;type> 'value' Indicates whether TypeConverter should be checked whether the type to be parsed supports conversion to/from byte array (e.g. an Image) Indicates whether the TypeConverter associated with the type supports conversion to/from a byte array (e.g. an Image). If that is the case the string is converted to a byte array from a base64 string. Overloaded. Formats the given value as string including type information. String will be in format %lt;type> 'value' Formats the given value as string including type information. String will be in format %lt;type> 'value' Indicates whether TypeConverter should be checked whether the type to be parsed supports conversion to/from byte array (e.g. an Image) Indicates whether the TypeConverter associated with the type supports conversion to/from a byte array (e.g. an Image). If that is the case the string is converted to a base64 string from a byte array. Returns the type name. If type is not in mscorlib, the assembly name is appended. Returns the type from the specified name. If an assembly name is appended the list of currently loaded assemblies in the current AppDomain are checked. Indicates whether string is null or empty. Indicates whether should trim whitespace characters from the end of the formatted text. Sets the value for the corresponding object available in the PropertyDescriptorCollection ItemProperties Record Value Mapping name of the column(Includeing complex mapping names) Generate the Property Descriptor for corresponding Property it may be simple or complex property Provides extension methods for Queryable source. var fonts = FontFamily.Families.AsQueryable(); We would normally write Expressions as, var names = new string[] {"Tony", "Al", "Sean", "Elia"}.AsQueryable(); names.OrderBy(n=>n); This would sort the names based on alphabetical order. Like so, the Queryable extensions are a set of extension methods that define functions which will generate expressions based on the supplied values to the functions. Generates an AND binary expression for the given Binary expressions. Generates the GroupBy Expression Generates a OrderBy query for the Queryable source. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(10).ToList(); var queryable = orders.AsQueryable(); var sortedOrders = queryable.OrderBy("ShipCountry"); Generates an OrderBy query for the IComparer defined. public class OrdersComparer : IComparer<Order> { public int Compare(Order x, Order y) { return string.Compare(x.ShipCountry, y.ShipCountry); } } var sortedOrders = db.Orders.Skip(0).Take(5).ToList().OrderBy(o => o, new OrdersComparer()); Generates an OrderByDescending query for the IComparer defined. public class OrdersComparer : IComparer<Order> { public int Compare(Order x, Order y) { return string.Compare(x.ShipCountry, y.ShipCountry); } } var sortedOrders = db.Orders.Skip(0).Take(5).ToList().OrderByDescending(o => o, new OrdersComparer()); Generates a OrderByDescending query for the Queryable source. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(10).ToList(); var queryable = orders.AsQueryable(); var sortedOrders = queryable.OrderByDescending("ShipCountry"); Generate expression from simple and complex property Generates an OR binary expression for the given Binary expressions. Creates a ParameterExpression that is required when building a series of predicates for the WHERE filter. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(100).ToList(); var queryable = orders.AsQueryable(); var parameter = queryable.Parameter(); Use this same parameter passed to generate different predicates and finally to generate the Lambda. If we specify a parameter for every predicate, then the Lambda expression scope will be out of the WHERE query that gets generated. Predicate is a Binary expression that needs to be built for a single or a series of values that needs to be passed on to the WHERE expression. var binaryExp = queryable.Predicate(parameter, "EmployeeID", "4", true); First create a ParameterExpression using the Parameter extension function, then use the same ParameterExpression to generate the predicates. Generates a Select query for a single property value. Generates a Select query based on the properties passed. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(10).ToList(); var queryable = orders.AsQueryable(); var selector = queryable.Select(new string[]{ "OrderID", "ShipCountry" }); Generates a Select query based on the properties passed. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(10).ToList(); var queryable = orders.AsQueryable(); var selector = queryable.Select(new List<string>() { "OrderID", "ShipCountry" }); It returns a dynamic class generated thru ReflectionEmit, Use reflection to identify the properties and values. Generates a SKIP expression in the IQueryable source. The source. The const value. Use this method with a cached delegate, this improves performance when using complex Expressions. Generates a TAKE expression in the IQueryable source. The source. The const value. Generates a ThenBy query for the Queryable source. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(10).ToList(); var queryable = orders.AsQueryable(); var sortedOrders = queryable.OrderBy("ShipCountry"); sortedOrders = sortedOrders.ThenBy("ShipCity"); Generates an ThenBy query for the IComparer defined. public class OrdersComparer : IComparer<Order> { public int Compare(Order x, Order y) { return string.Compare(x.ShipCountry, y.ShipCountry); } } var sortedOrders = db.Orders.Skip(0).Take(5).ToList().ThenBy(o => o, new OrdersComparer()); Generates an ThenByDescending query for the IComparer defined. public class OrdersComparer : IComparer<Order> { public int Compare(Order x, Order y) { return string.Compare(x.ShipCountry, y.ShipCountry); } } var sortedOrders = db.Orders.Skip(0).Take(5).ToList().ThenByDescending(o => o, new OrdersComparer()); Generates a ThenByDescending query for the Queryable source. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(10).ToList(); var queryable = orders.AsQueryable(); var sortedOrders = queryable.OrderBy("ShipCountry"); sortedOrders = sortedOrders.ThenByDescending("ShipCity"); Generates the where expression. var nw = new Northwind(@"Data Source = Northwind.sdf"); IQueryable queryable = nw.Orders.AsQueryable(); var filters = queryable.Where("ShipCountry", "z", FilterType.Contains); foreach (Orders item in filters) { Console.WriteLine("{0}/{1}", item.OrderID, item.ShipCountry); } Name of the property. Use this function to generate WHERE expression based on Predicates. The AndPredicate and OrPredicate should be used in combination to build the predicate expression which is finally passed on to this function for creating a Lambda. DataClasses1DataContext db = new DataClasses1DataContext(); var orders = db.Orders.Skip(0).Take(100).ToList(); var queryable = orders.AsQueryable(); var parameter = queryable.Parameter("ShipCountry"); var binaryExp = queryable.Predicate(parameter, "ShipCountry", "USA", true); var filteredOrders = queryable.Where(parameter, binaryExp); foreach (var order in filteredOrders) { Console.WriteLine(order); } Build Predicates for Contains / StartsWith / EndsWith, IQueryable queryable = nw.Orders.AsQueryable(); var parameter = queryable.Parameter(); var exp1 = queryable.Predicate(parameter, "ShipCountry", "h", FilterType.Contains); var exp2 = queryable.Predicate(parameter, "ShipCountry", "a", FilterType.StartsWith); var andExp = exp2.OrPredicate(exp1); var filters = queryable.Where(parameter, andExp); foreach (Orders item in filters) { Console.WriteLine("{0}/{1}", item.OrderID, item.ShipCountry); }