I have a controller called Account and an action called AddFunds()
In my HttpGet Addfunds() action I return the view bind to a ViewModel with a AccountId property, so by default the view contains a hidden field called AccountId.
In the HttpPost AddFunds() action, I received the updated ViewModel, with the same AccountID as passed by the HttpGet method, with some other parameters, such as Amount, etc.
What can I do to prevent a person to invoke the method directly passing a fake AccountId?
Does the AntiForgery token prevent this? Any other measure should I take?
As a side question, does passing the AccountID in a hidden field can be avoided or is it necessary to know which entity I am acting upon?
Thanks