public IHttpActionResult GetEventById(string eventId) //Gets a specific event { try { eventId = Encoding.Default.GetString(Convert.FromBase64String(eventId)); var evnt = EventsService.GetEventViewById(eventId); return(Ok(evnt)); } catch (InvalidModelException e) { return(BadRequest()); } catch (Exception e) { return(BadRequest()); } }