private void DoWork(Job job) { Task.Run(() => { switch (job.Entity) { case eWiftEntity.Meeting: _meetingService.DoWork(job); break; case eWiftEntity.Race: _raceService.DoWork(job); break; case eWiftEntity.Runner: _runnerService.DoWork(job); break; case eWiftEntity.Pool: _poolService.DoWork(job); break; case eWiftEntity.Dividend: _dividendService.DoWork(job); break; } } ); }