Ejemplo n.º 1
0
        public IActionResult Post(string id, [FromBody] Event newEvent)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(this.ModelState));
            }

            if (newEvent.EventName == "")
            {
                return(NotFound());
            }

            else
            {
                _eventService.AddNewEvent(id, newEvent);
                return(Ok(newEvent));
            }
        }