public async Task <IActionResult> AddAttractionToCity(int?cityId, int?attractionId) { if (!cityId.HasValue || !attractionId.HasValue) { return(BadRequest("Id must be given")); } var added = await _cityRepository.AddAttractionToCity(attractionId.Value, cityId.Value); if (added) { return(Ok("Added attraction to city")); } return(BadRequest("Attraction or city doesn't exist")); }