Esempio n. 1
0
        public async Task <IActionResult> CreateTravel(Travel travel)
        {
            try
            {
                var response = await _service.CreateNewTravel(travel);

                if (response != null)
                {
                    return(Ok(response));
                }
                return(StatusCode(StatusCodes.Status204NoContent));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }