问题描述
无法重定向到某些页面,显示错误消息“路由表中的路由与提供的值不匹配。在MVC 5中”
// before
this.mapper.map(career,ResponseCareerDto,Career);
// after
await this.mapper.mapAsync(career,Career);
解决方法
您正在将路线属性值传递给RedirectToAction
。相反,您需要ActionResult
的名称,在本例中为Index。
return RedirectToAction("Index");