防止重复Post(nameof(GetAll)相当于字符串,利于重构)

 return RedirectToAction(nameof(GetAll)); //重定向解决刷新会重复添加数据的问题

相关文章: