public IActionResult AdminObfuscateGetAsync(string sourcePath, string destinationPath) { string result = "Created Obfuscation Job: "; lock (_thisLock) { string uploadPath = _configuration["UploadPath"]; string connectionString = _context.Database.GetDbConnection().ConnectionString; ImportUtility.CreateObfuscationDestination(uploadPath + destinationPath); // use Hangfire string jobId = BackgroundJob.Enqueue(() => BcBidImport.ObfuscationJob(null, connectionString, uploadPath + sourcePath, uploadPath + destinationPath)); result += jobId; } return(new ObjectResult(result)); }
public virtual IActionResult AdminObfuscateGet([FromQuery] string sourcePath, [FromQuery] string destinationPath) { string result = "Created Obfuscation Job: "; lock (_thisLock) { // get upload path string uploadPath = _configuration["UploadPath"]; // get connection string string connectionString = GetConnectionString(); ImportUtility.CreateObfuscationDestination(uploadPath + destinationPath); // use Hangfire string jobId = BackgroundJob.Enqueue(() => BcBidImport.ObfuscationJob(null, connectionString, uploadPath + sourcePath, uploadPath + destinationPath)); result += jobId; } return(new ObjectResult(result)); }