xpo-devexpress-dot-xpo-dot-session-aac824e4.md
Gets metadata on persistent objects in a data store.
Namespace : DevExpress.Xpo
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
[Browsable(false)]
public virtual XPDictionary Dictionary { get; }
<Browsable(False)>
Public Overridable ReadOnly Property Dictionary As XPDictionary
| Type | Description |
|---|---|
| XPDictionary |
An XPDictionary object which provides metadata on persistent objects in a data store.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Dictionary property.
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.
XPO_how-to-persist-metadata-e269/CS/Program.cs#L79
XPCollection<PersistentClassInfo> classes = new XPCollection<PersistentClassInfo>(metadataSession);
PersistentClassInfo.FillDictionary(dataSession.Dictionary, classes);
}
if (!dynamicClasses.TryGetValue(tableName, out dataTableClassInfo)) {
dynamicClasses.Add(tableName, new DynamicDataTableClassInfo(workSession.Dictionary, dataTable));
}
DBTable[] tables = provider.GetStorageTables("Product");
gridControl2.DataSource = new XPCollection(session1, Program.AddClass(session1.Dictionary, tables[0]));
}
session1.Dictionary.GetDataStoreSchema(typeof(PersistentObject1).Assembly);
AuditTrailService.GetService(null).SetXPDictionary(session1.Dictionary);
AuditTrailService.GetService(null).AuditDataStore = new AuditDataStore<AuditDataItemPersistent, AuditedObjectWeakReference>();
XPO_how-to-bind-data-to-winforms-controls-using-xpbindingsource/CS/DXApplication/Form1.cs#L75
CategoryListSource.DataSource = UnitOfWork.Query<Categories>().OrderBy(t => t.CategoryName).ToList();
CategoryListSource.Dictionary = UnitOfWork.Dictionary;
SupplierListSource.DataSource = new XPCollection<Suppliers>(UnitOfWork, null, new SortProperty("CompanyName", SortingDirection.Ascending));
XPO_how-to-persist-metadata-e269/VB/Program.vb#L69
Dim classes As XPCollection(Of PersistentClassInfo) = New XPCollection(Of PersistentClassInfo)(metadataSession)
PersistentClassInfo.FillDictionary(dataSession.Dictionary, classes)
End Using
If Not dynamicClasses.TryGetValue(tableName, dataTableClassInfo) Then
dynamicClasses.Add(tableName, New DynamicDataTableClassInfo(workSession.Dictionary, dataTable))
End If
XPO_how-to-bind-data-to-winforms-controls-using-xpbindingsource/VB/DXApplication/Form1.vb#L61
CategoryListSource.DataSource = UnitOfWork.Query(Of Categories)().OrderBy(Function(t) t.CategoryName).ToList()
CategoryListSource.Dictionary = UnitOfWork.Dictionary
SupplierListSource.DataSource = New XPCollection(Of Suppliers)(UnitOfWork, Nothing, New SortProperty("CompanyName", SortingDirection.Ascending))
See Also