Ejemplo n.º 1
0
        public IActionResult Make(Guid id)
        {
            var query = new GetMakeQuery(id);
            var make  = _queryProcessor.Process(query);

            return(View(make));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <GetMakeDto> > GetMake([FromRoute] GetMakeQuery query)
        {
            var make = await this.Mediator.Send(query);

            this.logger.LogInformation("Getting item {ID}", query.Id);

            if (make == null)
            {
                this.logger.LogWarning("Cannot find Make object with corresponding id: {0}", query.Id);
                return(NotFound(query));
            }

            return(Ok(make));
        }
Ejemplo n.º 3
0
 public Make Handle(GetMakeQuery query)
 {
     return(_makeRepository.GetById(query.Id));
 }