I'm wondering what is the most effective way of returning from an editpost method to the Edit view?
So after updating a post I can either do this
return RedirectToAction("Edit", new { ID = id });
or this:
string url = $"/Post/Edit/{id}"; return Redirect(url);
The edit action method(that both these return statements sends an id to) is just the standard fetch whatever post that belongs to id, populate it in a viewmodel and return it to view.
I'm wondering if using Redirect() is faster or has some benefits over the first one? Maybe the only difference is that in the redirectto action i also create a new variable, and that they work exactly the same in my case?