The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.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.v19.2.dll

Declaration

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

Parameters

Name Type Description
theObject Object

An object which represents the persistent object to save.

Parameters

Name Type Description
theObject Object

An object which represents the persistent object to save.

Remarks

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);
session.Save(personToUpdate);

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