public IActionResult Create(Mazist customsAgent) { db.Mazists.Add(customsAgent); db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Delete(int id) { Mazist customsAgent = db.Mazists.Find(id); if (customsAgent != null) { db.Mazists.Remove(customsAgent); db.SaveChanges(); } return(RedirectToAction("Index")); }
public IActionResult Details(int?id) { if (id == null) { return(NotFound()); } Mazist customsAgent = db.Mazists.Find(id); if (customsAgent != null) { return(View(customsAgent)); } return(NotFound()); }
public IActionResult Edit(Mazist customsAgent) { db.Entry(customsAgent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }