DbContext per request aspboilerplate
问题 I need to implement multithreading background job for import file. I have implemented it with background job(Hangfire). But if i use one thread it goes very slow. The function look like this. I using non-transaction unit to save changes to db immediately. var contactFound = await _contactRepository.FirstOrDefaultAsync(x => x.Email.ToLower() == contact.Email.ToLower()); if (contactFound != null) { await _bjInfoManager.AddLog(args.JobId, "Found duplicated email: " + contact.Email); } else {