Exemplo n.º 1
0
        public async Task <IActionResult> Delete(int id)
        {
            if (CheckValue(id, nameof(id)))
            {
                return(BadRequest(string.Format(Messages.NotAllParametersSpecified, Container.ToString())));
            }

            var channel = await _channelService.GetChannelByIdAsync(id);

            if (channel == null)
            {
                return(NotFound(string.Format(Messages.NoEntitiesFoundWithSpecifiedCriteria)));
            }

            await _channelService.DeleteChannelAsync(id);

            return(Ok());
        }