public async Task <IActionResult> GetAsync(int id) { var result = await creditCardService.GetByIdAsync(id); if (!result.Success) { return(BadRequest(result.Message)); } var CreditCardResource = mapper.Map <CreditCard, CreditCardResource>(result.Resource); return(Ok(CreditCardResource)); }