xpo-devexpress-dot-xpo-dot-xpobject.md
Gets or set a value which identifies the persistent object.
Namespace : DevExpress.Xpo
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
[Persistent("OID")]
[Key(AutoGenerate = true)]
public int Oid { get; set; }
<Persistent("OID")>
<Key(AutoGenerate:=True)>
Public Property Oid As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value which identifies the object.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Oid 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.
wpf-data-grid-implement-crud-operations/CS/CodeBehind/XPO/LocalData/MainWindow.xaml.cs#L18
var xpCollection = new XPCollection<User>(_UnitOfWork);
xpCollection.Sorting.Add(new SortProperty(nameof(User.Oid), DevExpress.Xpo.DB.SortingDirection.Ascending));
grid.ItemsSource = xpCollection;
how-to-bind-wpf-grid-to-data/CS/CodeBehind/XPO/LocalData/MainWindow.xaml.cs#L17
var xpCollection = new XPCollection<User>(_UnitOfWork);
xpCollection.Sorting.Add(new SortProperty(nameof(User.Oid), DevExpress.Xpo.DB.SortingDirection.Ascending));
grid.ItemsSource = xpCollection;
CriteriaOperatorsCheatSheet/CS/CriteriaOperatorCheatSheet/Tests/Aggregate_Single.cs#L64
//assert
var reqId = uow.FindObject<OrderItem>(new BinaryOperator(nameof(OrderItem.OrderItemName), "Task2-1")).Oid;
Assert.AreEqual(reqId, result3);
CriteriaOperator.Parse("Max(Sequence)"),
new OperandProperty("Quote.Oid") == q.Oid
)
foreach(var entity in allEntities) {
Console.WriteLine($"Id: {entity.Oid}; Data: {entity.Data};");
}
XPO_how-to-reopen-a-broken-connection-when-using-a-postgresql-database-e3086/VB/Program.vb#L28
uow.CommitChanges()
Return result.Oid
End Using
For i As Integer = 0 To count - 1
resourceIds_Renamed.Add(Resources(i).Oid)
Next i
See Also