IdeaBlade.EntityModel.Compat Assembly > IdeaBlade.EntityModel.Compat Namespace > EntityManagerPartialSaveExtensions Class : SaveChangesAsync Method |
'Declaration
<AsyncStateMachineAttribute(IdeaBlade.EntityModel.Compat.EntityManagerPartialSaveExtensions+d__2)> <ExtensionAttribute()> Public Shared Function SaveChangesAsync( _ ByVal entityManager As EntityManager, _ ByVal entities As IEnumerable, _ Optional ByVal saveOptions As SaveOptions _ ) As Task
'Usage
Dim entityManager As EntityManager Dim entities As IEnumerable Dim saveOptions As SaveOptions Dim value As Task value = EntityManagerPartialSaveExtensions.SaveChangesAsync(entityManager, entities, saveOptions)
[AsyncStateMachine(IdeaBlade.EntityModel.Compat.EntityManagerPartialSaveExtensions+d__2)] [Extension()] public static Task SaveChangesAsync( EntityManager entityManager, IEnumerable entities, SaveOptions saveOptions )
Exception | Description |
---|---|
IdeaBlade.EntityModel.EntityManagerSaveException | Thrown for save exceptions not handled by an EntityServerError handler |
System.OperationCanceledException | Thrown if the save was cancelled |
If the save fails an IdeaBlade.EntityModel.EntityManagerSaveException will be thrown.
If the save is cancelled an System.OperationCanceledException will be thrown.
The asynchronous save task itself cannot be cancelled. However, you can cancel the save process on the client before the save starts in a EntityManager.Saving event handler. You can also cancel the save process on the server in an EntityServerySaveInterceptor prior to executing the save to the data source.
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