Back to Devexpress

XPCollection<T> Class

xpo-devexpress-dot-xpo-dot-xpcollection-1.md

latest2.4 KB
Original Source

XPCollection<T> Class

A generic type collection of persistent objects.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public class XPCollection<T> :
    XPBaseCollection,
    IList<T>,
    ICollection<T>,
    IEnumerable<T>,
    IEnumerable
vb
Public Class XPCollection(Of T)
    Inherits XPBaseCollection
    Implements IList(Of T),
               ICollection(Of T),
               IEnumerable(Of T),
               IEnumerable

Type Parameters

NameDescription
T

The type of elements in the collection.

|

Remarks

The XPCollection<T> class is a collection of persistent objects, much like the XPCollection. The only difference is that the XPCollection<T> is a generic type collection, which contains persistent objects as specified by T , and as a result, the collection cannot be used as a data source at design time.

Example:

csharp
XPCollection<Person> persons = new XPCollection<Person>(session1, 
    CriteriaOperator.Parse("FirstName = 'John'"));
vb
Dim persons As New XPCollection(Of Person)(session1, _
CriteriaOperator.Parse("FirstName = 'John'"))

As with the XPCollection, the XPCollection<T> is used to query data stores for specific objects and to represent the “many” end of object associations.

Implements

ISessionProvider

Inheritance

Object MarshalByRefObject Component XPBaseCollection XPCollection<T>

See Also

XPCollection<T> Members

DevExpress.Xpo Namespace