public ActionResult Edit(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var eventViewModel = eventAppService.GetById((Guid)id); if (eventViewModel == null) { return(HttpNotFound()); } return(View(eventViewModel)); }
public IActionResult Details(Guid?id) { if (id == null) { return(NotFound()); } var eventViewModel = _eventAppService.GetById(id.Value); if (eventViewModel == null) { return(NotFound()); } return(View(eventViewModel)); }
public IActionResult GetById(Guid id) { try { var response = _mapper.Map <Event, EventViewModel>(_eventAppService.GetById(id)); return(Ok(response)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public ActionResult <EventViewModel> Get(int id) { return(_mapper.Map <Core.Event.Event, EventViewModel>((Core.Event.Event)_eventApp.GetById(id))); }