Same (partial) view
You create only one, but strongly typed view (depending on the user interface, this can, of course, be a partial view). When adding new data, return this view from the controller action with the default instance of the model object (usually this is just a new instance without any properties), but when you edit, return it with the instance of the object you want to edit.
Control part
As for controller actions, you can have four of them:
- Add GET
return View("SomeView", new Customer()); - Add POST
- Change GET
return View("SomeView", new CustomerRepository().GetCustomer(id)); - Change POST
Bot GET actions return the same view, but with a different model, as described previously. POST actions store the submitted data, but return everything they need. Probably some RedirectToAction()...