Beispiel #1
0
        public async Task <JobOrder> SubmitJobOrder(string confId, Job jobDetail)
        {
            var importTask     = new TaskCompletionSource <JobOrder>();
            var importJobOrder = JobOrder.CreateJobOrder(jobDetail);
            var conference     = await _dbContext.FindAsync <Conference>(Int32.Parse(confId));


            conference.AddJobOrder(importJobOrder);

            _dbContext.Update <Conference>(conference);

            _dbContext.SaveChanges();
            importTask.SetResult(importJobOrder);

            return(await importTask.Task);
        }