SyntaxFix
Write A Post
Hire A Developer
Questions
Make the id parameter be a nullable int:
public ActionResult Edit(int? id, User collection)
And then add the validation:
if (Id == null) ...