Ejemplo n.º 1
0
        public IActionResult Create(Mazist customsAgent)
        {
            db.Mazists.Add(customsAgent);
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public IActionResult Delete(int id)
        {
            Mazist customsAgent = db.Mazists.Find(id);

            if (customsAgent != null)
            {
                db.Mazists.Remove(customsAgent);
                db.SaveChanges();
            }
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 3
0
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            Mazist customsAgent = db.Mazists.Find(id);

            if (customsAgent != null)
            {
                return(View(customsAgent));
            }
            return(NotFound());
        }
Ejemplo n.º 4
0
 public IActionResult Edit(Mazist customsAgent)
 {
     db.Entry(customsAgent).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }