asynchronous saves

asynchronous saves

Old forum URL: forums.lhotka.net/forums/t/9556.aspx


fsl posted on Tuesday, September 21, 2010

Hi there

Is it possible to check whether any asynchronous saves are being performed/pending in the dataportal?

I would like to insure that all async saves are completed, before the application shuts down.. (WPF desktop app)

 

Regards,

Fredrik

RockfordLhotka replied on Tuesday, September 21, 2010

You can probably create a static type that handles the static methods on Csla.DataPortal (DataPortalInvoke and DataPortalInvokeComplete), and in your event handlers implement threadsafe increment/decrement counters (probably using System.Threading.Interlocked) to maintain a count of outstanding data portal calls.

Copyright (c) Marimer LLC