.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.Save(Object) Method

Saves the specified persistent object to a data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v20.2.dll


public void Save(
    object theObject
Public Sub Save(
    theObject As Object


Name Type Description
theObject Object

An object which represents the persistent object to save.


Below is an example of using the Save method. Here, session is the Session instance.

Person personToUpdate = session.FindObject<Person>(CriteriaOperator.Parse("Name='Michael Suyama'"));
personToUpdate.Birthday = new DateTime(1986, 10, 31);

The Save method also saves all the referenced objects that are aggregated (see the AggregatedAttribute topic for information) and any referenced newly created non-aggregated objects that don't yet exist in the data store.

See Also