Beispiel #1
0
        public async Task <Response> GetById(int id)
        {
            var response = new Response();
            var result   = await _repositoyQuery.GetById(id);

            response.Data = result;
            return(response);
        }
        public async Task <Response> GetBookByID(int id)
        {
            Response response = new Response();

            if (id == 0)
            {
                return(response);
            }

            var result = await _repositoryQuery.GetById(id);

            response.Data = result;
            return(response);
        }
Beispiel #3
0
 public async Task <Logger> Handle(GetLoggerByIdQuery request, CancellationToken cancellationToken)
 {
     return(await _repository.GetById(request.Id, cancellationToken));
 }