public async Task <IActionResult> UpdateAsync([FromBody] AdvertisementEntry advertisementEntry) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (!await _channelService.ChannelsExistAsync(advertisementEntry.ChannelIds)) { return(BadRequest()); } var exists = await _advertisementService.ExistsAsync(advertisementEntry.Id); if (!exists) { return(NotFound()); } await _advertisementService.UpdateAsync(advertisementEntry); return(NoContent()); }