Exemplo n.º 1
0
        public async Task <Submission> Get(string id)
        {
            var commandBroker = new CommandBroker <Submission>();
            var entity        = await commandBroker.GetEntity(id);

            return(entity.Entity);
        }
Exemplo n.º 2
0
        public Task Release(string id, [FromBody] ReleaseSubmissionRequest request)
        {
            var commandBroker = new CommandBroker <Submission>();

            return(commandBroker.IssueCommand(
                       id,
                       request.CommandId,
                       new ReleaseSubmissionCommand()));
        }
Exemplo n.º 3
0
        public Task Post([FromBody] CreateSubmissionRequest request)
        {
            var commandBroker = new CommandBroker <Submission>();

            return(commandBroker.IssueCommand(
                       request.SubmissionId,
                       request.CommandId,
                       new CreateSubmissionCommand
            {
                SubmitterName = request.SubmitterName,
                Number = "1234-5678"
            }));
        }