DevForce Help Reference
TrySaveChanges Method (EntityManagerPartialSaveExtensions)


The EntityManager holding entities to be persisted.
List of IdeaBlade.EntityModel.IEntity objects to be persisted
Options controlling save processing
Persists one or more selected Entities within the EntityManager cache to the backend data source using the IdeaBlade.EntityModel.SaveOptions specified.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Shared Function TrySaveChanges( _
   ByVal entityManager As EntityManager, _
   ByVal entities As IEnumerable, _
   Optional ByVal saveOptions As SaveOptions _
) As SaveResult
'Usage
 
Dim entityManager As EntityManager
Dim entities As IEnumerable
Dim saveOptions As SaveOptions
Dim value As SaveResult
 
value = EntityManagerPartialSaveExtensions.TrySaveChanges(entityManager, entities, saveOptions)

Parameters

entityManager
The EntityManager holding entities to be persisted.
entities
List of IdeaBlade.EntityModel.IEntity objects to be persisted
saveOptions
Options controlling save processing

Return Value

A IdeaBlade.EntityModel.SaveResult that contains a boolean indicating the result of the save as well as any error encountered during the save.
Remarks
Persists a subset of additions, modifications and deletions within the EntityManager cache to the backend data source. Upon success, these entities will be in an Unchanged state.

A IdeaBlade.EntityModel.SaveResult is always returned. The SaveResult will indicate if the save was successful, if processing was cancelled, or it an error occurred.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityManagerPartialSaveExtensions Class
EntityManagerPartialSaveExtensions Members
SaveResult Class

Send Feedback