public ActionResult Map(string feed, ColumnMapViewModel model) { var filePaths = TempData["FilePaths"] as List <string>; if (filePaths != null && filePaths.Any()) { var mapper = this.mappingServiceFactory.GetMappingService(feed); var results = new MapResultsViewModel { Results = mapper.Map(filePaths, this.Request.Form) }; TempData["Errors"] = results.Results.Log; return(View("Results", results)); } return(this.RedirectToAction("Index", "Home")); }
// GET: /feed/map public ActionResult Map(string feed) { var filePaths = TempData["FilePaths"] as List <string>; if (filePaths != null && filePaths.Any()) { TempData.Keep(); var mapper = this.mappingServiceFactory.GetMappingService(feed); if (mapper != null) { var model = new ColumnMapViewModel { Columns = mapper.GetHeaders(filePaths[0]), FieldLabels = mapper.GetFieldLabels() }; return(View(model)); } } return(this.RedirectToAction("Index", "Home")); }