public IActionResult Make(Guid id) { var query = new GetMakeQuery(id); var make = _queryProcessor.Process(query); return(View(make)); }
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)); }
public Make Handle(GetMakeQuery query) { return(_makeRepository.GetById(query.Id)); }