public Response DeleteChannel(Guid idChannel) { bool existe = _repositoryVideo.ThereIsAssociatedChannel(idChannel); if (existe) { AddNotification("Canal", MSG.NAO_E_POSSIVEL_EXCLUIR_UM_X0_ASSOCIADO_A_UM_X1.ToFormat("canal", "vídeo")); return(null); } Channel channel = _repositoryChanner.Get(idChannel); if (channel == null) { AddNotification("Canal", MSG.DADOS_NAO_ENCONTRADOS); } if (IsInvalid()) { return(null); } _repositoryChanner.Delete(channel); return(new Response() { Message = MSG.OPERACAO_REALIZADA_COM_SUCESSO }); }