The second create action
Preparing the second create action method
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>The current code in second create method
// POST: MoviesController/Create
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(IFormCollection collection)
{
try
{
return RedirectToAction(nameof(Index));
}
catch
{
return View();
}
}Modify the code as shown below
Let us further modify the code
We need to now implement the add method in our fake context as shown:
Implement add method in fake context
Last updated