xpo-devexpress-dot-xpo-dot-session-dot-getclassinfo-1.md
Returns the XPClassInfo for the type designated by the specified generic type parameter.
Namespace : DevExpress.Xpo
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
public XPClassInfo GetClassInfo<ClassType>()
Public Function GetClassInfo(Of ClassType) As XPClassInfo
| Name |
|---|
| ClassType |
| Type | Description |
|---|---|
| XPClassInfo |
An XPClassInfo object which provides metadata information for a class of the specified type.
|
This method retrieves metadata information via the Session.Dictionary. If the metadata cannot be obtained from a class of the specified type, the CannotResolveClassInfoException is thrown.
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetClassInfo<ClassType>() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
how-to-bind-wpf-grid-to-data/CS/CodeBehind/XPO/PagedAsyncSource/MainWindow.xaml.cs#L17
using(var session = new Session()) {
var classInfo = session.GetClassInfo<Issue>();
var properties = classInfo.Members
wpf-data-grid-implement-crud-operations/CS/CodeBehind/XPO/PagedAsyncSource/MainWindow.xaml.cs#L17
using(var session = new Session()) {
var classInfo = session.GetClassInfo<Issue>();
var properties = classInfo.Members
XPO_how-to-implement-odata4-service-with-xpo-netcore/CS/ODataService/Helpers/ApiHelper.cs#L34
}
var classInfo = uow.GetClassInfo<TEntity>();
var memberInfo = classInfo.FindMember(navigationProperty);
XPO_how-to-implement-odata4-service-with-xpo/CS/ODataService/Helpers/ApiHelper.cs#L43
}
var classInfo = uow.GetClassInfo<TEntity>();
var memberInfo = classInfo.FindMember(navigationProperty);
XPO_how-to-bind-data-to-winforms-controls-using-xpbindingsource/CS/DXApplication/Form1.cs#L63
ProductListSource.DataSource = UnitOfWork.Query<Products>().ToList();
ProductListSource.ObjectClassInfo = UnitOfWork.GetClassInfo<Products>();
break;
how-to-bind-wpf-grid-to-data/VB/CodeBehind/XPO/InfiniteAsyncSource/MainWindow.xaml.vb#L14
Using session = New Session()
Dim classInfo = session.GetClassInfo(Of Issue)()
Dim properties = classInfo.Members.Where(Function(member) member.IsPublic AndAlso member.IsPersistent).[Select](Function(member) member.Name).ToArray()
euow = New ExplicitUnitOfWork(dataLayer)
classInfo = euow.GetClassInfo(Of T)()
End Sub
XPO_how-to-bind-data-to-winforms-controls-using-xpbindingsource/VB/DXApplication/Form1.vb#L52
ProductListSource.DataSource = UnitOfWork.Query(Of Products)().ToList()
ProductListSource.ObjectClassInfo = UnitOfWork.GetClassInfo(Of Products)()
Case "Single Object"
See Also