예제 #1
0
        public async Task <Guid> StartCalculation(CalculatorJob calculatorJob)
        {
            _context.CalculatorJobs.Add(calculatorJob);
            await _context.SaveChangesAsync();

            BackgroundJob.Enqueue(() => RunInBackground(calculatorJob.Id));

            return(calculatorJob.Id);
        }
 public async Task CompleteAsync()
 {
     await _context.SaveChangesAsync();
 }