Adding Edit ActionResult

As we did regularly, we need to create 2 function, Edit and Edit after HttpPost. The structure shown below.

public ActionResult Edit(int id)
{
    ..
    PreparePublisher(model);
    return View(model);
}

[HttpPost]
public ActionResult Edit(SongModel model)
{
    try
    {
        ..
        context.SubmitChanges();
        return RedirectToAction("Index");
    }
    catch
    {
        return View(model);
    }
}

results matching ""

    No results matching ""