Beispiel #1
0
        public IActionResult Post([FromBody] DeparturesDTO departure)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var result = _service.Add(departure);

            return(result == true?StatusCode(200) : StatusCode(500));
        }