I am working on ASP.NET Core project and have a dilemma: I have got a table of items filled from ajax request (from api controller). Now clicking individual item I want to open Details view - pretty simple.
But I have 2 choices:
1 - Pass item's id to my mvc "Details" controller, then from there call database again, get the requested object and return the view.
2 - Pass the whole JSON object to my mvc "Details" controller via @Html.ActionLink (since I already have one in my table), and build the view.
Choice #2 seems better at first sight, because I am saving extra trip to the database and all operation happens on the client.
But I have a hesitation if it's ok to do it this way (pass the whole objects via url) from all further prospectives, like security?
As you know I can't annotate my "Details" mvc controller with [ChildActionOnly] anymore, so the url query is easily editable.