public UserService( IRestUserService restUserService, IEtherscanApiClient etherscanApi ) { Guard.NotNull(restUserService, nameof(restUserService)); _restService = restUserService; _etherscanApi = etherscanApi; }
public async Task <ActionResult <TicketDto> > GetTicket(int id, [FromServices] IAdService adService, [FromServices] IRestUserService restUserService) { //id = 22222; //test if (id < 1) { return(BadRequest()); } _logger.LogInformation(ApiLogEvents.GetItem, $"{nameof(GetTicket)} with {id} Started"); var repoObj = await _repository.GetId(id).ConfigureAwait(false); if (repoObj == null) { //return NotFound(); throw new Core.NotFoundException($"{nameof(GetTicket)}", id); } var result = _mapper.Map <TicketDto>(repoObj); return(Ok(result)); }
public ClaimsTransformation(IRestUserService restUserService) { _restUserService = restUserService; }