public async Task <ActionResult <RepositoryModel> > Update([FromBody] UpdateRepositoryCommand model) { var(repositoryModel, isCreated) = await _mediator.Send(model); return(isCreated ? Created(string.Empty, CreateLinksForRepository(new BaseResponseModel <RepositoryModel>(repositoryModel))) : Ok(CreateLinksForRepository(new BaseResponseModel <RepositoryModel>(repositoryModel)))); }
public virtual Task Handle(UpdateRepositoryCommand <TModel> command, CancellationToken cancellationToken) => Save(command.Model, cancellationToken, EntityState.Modified, command.UpdateModelAfterCommit);