WCF/WF - C# WCF threading database operations so client does not wait on completion

Asked By Corey on 18-Jun-13 05:55 PM
in my wcf web service proxy I need to save response/request xml to the database but do not want the client to wait while saving and send the response back as soon as it is ready.  So I need to put the db operations in on another thread
any examples?


I'll need it somewhere in there I think
private static xGetApplicationScheduleResponse TDCApplicationScheduleResponse(xGetApplicationScheduleRequest request)
 {
   var tdcApplicationSchedResponse = new TDC.API.Application.xGetApplicationScheduleResponse();
   var client = new TDCAPIClient();
 
   try
   {
     tdcApplicationSchedResponse = client.ApplicationEndPoint.xGetApplicationSchedule(request);
     //TODO: Thread response/request, serialized and save to DB
   }
   catch(Exception ex)
   {
     //TODO: log stack trace
   }
 
   return tdcApplicationSchedResponse;
 }
Robbe Morris replied to Corey on 18-Jun-13 07:13 PM
Why wouldn't your client just make the WCF call asynchronously?