public async Task <IActionResult> AddCity([FromBody] CityDTO cityDTO) { if (cityDTO == null) { return(StatusCode(400, new { message = Constants.MissingOrInvalidBody })); } if (!ModelState.IsValid) { return(StatusCode(400, new { message = Constants.MissingOrInvalidBody })); } try { var result = await _movieService.AddCity(cityDTO); return(Created("AddedCity", new { id = result.CityId, Name = result.CityName })); } catch (CustomException ex) { return(StatusCode(400, new { message = ex.Message })); } catch (Exception ex) { return(StatusCode(500, new { message = ex.Message })); } }