Back to Devexpress

XPObject.Oid Property

xpo-devexpress-dot-xpo-dot-xpobject.md

latest4.4 KB
Original Source

XPObject.Oid Property

Gets or set a value which identifies the persistent object.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
[Persistent("OID")]
[Key(AutoGenerate = true)]
public int Oid { get; set; }
vb
<Persistent("OID")>
<Key(AutoGenerate:=True)>
Public Property Oid As Integer

Property Value

TypeDescription
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

csharp
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

csharp
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

csharp
//assert
var reqId = uow.FindObject<OrderItem>(new BinaryOperator(nameof(OrderItem.OrderItemName), "Task2-1")).Oid;
Assert.AreEqual(reqId, result3);

XPO_how-to-get-the-maximum-or-minimum-objects-value-from-a-collection-e468/CS/ConsoleApplication1/Program.cs#L24

csharp
CriteriaOperator.Parse("Max(Sequence)"),
    new OperandProperty("Quote.Oid") == q.Oid
)

XPO_how-to-implement-a-custom-xpo-connection-provider-for-adonetcore-aseclient/CS/TestingConsoleProject/Program.cs#L28

csharp
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

vb
uow.CommitChanges()
    Return result.Oid
End Using

winforms-scheduler-bind-xpo-multi-resource-appointments/VB/XPO_MultiResource_Example/XPAppointment.vb#L89

vb
For i As Integer = 0 To count - 1
    resourceIds_Renamed.Add(Resources(i).Oid)
Next i

See Also

XPObject Class

XPObject Members

DevExpress.Xpo Namespace