public ActionResult Edit() { var _event = new EventViewModel(); _eventLogic.GetById(_event); return(View(_event)); }
public IActionResult GetEventById(int id) { try { var @event = _eventLogic.GetById(id); if (@event == null) { return(NotFound()); } return(Ok(@event)); } catch (Exception ex) { return(StatusCode(500, "Internal server error")); } }