title: MVC - GET & POST actions with the same name and parameters in the same controller
body: <p>I'm working on an MVC4 project, and I have two actions in the same controller with the same name and parameters:</p>
  
  <pre><code>public ActionResult Create(CreateBananaViewModel model)
  {
      if (model == null)
          model = new CreateBananaViewModel();
  
      return View(model);
  }
  
  [HttpPost]
  public ActionResult Create(CreateBananaViewModel model)
  {
      // Model Save Code...
  
      return RedirectToAction("Index");
  }
  </code></pre>
  
  <p>The reason I want to pass an existing model into my Create method is to clone and then modify an existing model.</p>
  
  <p>Obviously the compiler doesnt like this, so I've changed one method to look like this:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Create(CreateBananaViewModel model, int? uselessInt)
  {
      // Model Save Code...
  
      return RedirectToAction("Index");
  }
  </code></pre>
  
  <p>Is this perfectly acceptable? Or is there a nicer way of getting around this problem?</p>
  
  <p>EDIT / SOLUTION:</p>
  
  <p>Looks like I completely over complicated the situation. Here's my solution</p>
  
  <pre><code>public ActionResult Duplicate(Guid id)
  {
      var banana = GetBananaViewModel(id);
  
      return View("Create", model);
  }
  
  public ActionResult Create()
  {
      var model = new CreateBananaViewModel();
  
      return View(model);
  }
  </code></pre>