Exemplo n.º 1
0
        public async Task <IActionResult> UnpublishContent(Guid id)
        {
            var command = new UnpublishContent {
                ContentId = id
            };

            await CommandBus.PublishAsync(command);

            return(NoContent());
        }
Exemplo n.º 2
0
        public ContentDomainObject Unpublish(UnpublishContent command)
        {
            Guard.NotNull(command, nameof(command));

            VerifyCreatedAndNotDeleted();

            RaiseEvent(SimpleMapper.Map(command, new ContentUnpublished()));

            return(this);
        }
Exemplo n.º 3
0
 protected Task On(UnpublishContent command, CommandContext context)
 {
     return(handler.UpdateAsync <ContentDomainObject>(context, c => c.Unpublish(command)));
 }