public void Post(PerformOrganization request) { // Don't await this var task = _iFileOrganizationService.PerformOrganization(request.Id); // Async processing (close dialog early instead of waiting until the file has been copied) // Wait 2s for exceptions that may occur to have them forwarded to the client for immediate error display task.Wait(2000); }
public void Post(PerformOrganization request) { var task = _iFileOrganizationService.PerformOrganization(request.Id); Task.WaitAll(task); }