Ejemplo n.º 1
0
 public IActionResult Edit(int id, [Bind] EventDetailEditViewModel model)
 {
     if (ModelState.IsValid)
     {
         _eventMapper.Update(model.ToEvent());
         return(RedirectToAction(nameof(Admin)));
     }
     return(View(model));
 }
Ejemplo n.º 2
0
        public IActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var e     = _eventMapper.Find(id.Value);
            var model = new EventDetailEditViewModel(e);

            return(View(model));
        }