public ActionResult Index()
{
int retCode = Errors.SUCCESS;
var da = this.GetDataAccess();
var ids= new List<Models.Users>();
retCode = da.GetId(this.GetId(), ref ids, profiler);
return this.CheckIdForView(nRetCode, View(ids));
}
public ActionResult DeleteUser(string id)
{
var da = this.GetDataAccess();
var ids = new List<Models.Users>();
int retCode = Errors.SUCCESS;
retCode = da.DeleteId(this.GetId(), id);
return RedirectToAction("Index");
}
}
Очевидно, что при удалении пользовательского действия retcode стирается, как только он перенаправляет на действие index. Мне было интересно, как лучше сохранить такой код. Я видел много разговоров о TempData, но разве это лучшая практика?