public IHttpActionResult DoImport(CsvImportConfiguration importConfiguration) { var notification = new ImportNotification(CurrentPrincipal.GetCurrentUserName()) { Title = "Import catalog from CSV", Description = "starting import...." }; _notifier.Upsert(notification); var importJob = new CsvCatalogImportJob(); BackgroundJob.Enqueue(() => importJob.DoImport(importConfiguration, notification)); return(Ok(notification)); }
public IHttpActionResult DoImport(CsvImportConfiguration importConfiguration) { var notification = new ImportNotification(CurrentPrincipal.GetCurrentUserName()) { Title = "Import catalog from CSV", Description = "starting import...." }; _notifier.Upsert(notification); var importJob = new CsvCatalogImportJob(); BackgroundJob.Enqueue(() => importJob.DoImport(importConfiguration, notification)); return Ok(notification); }