public async Task <ApiResponse <int> > CreateCurrency(CreateCurrencyFrontCommand currency) { try { await AddBearerToken(); var mappedCurrency = _mapper.Map <CreateCurrencyCommand>(currency); var response = await _client.CreateCurrencyAsync(ApiVersion.apiVersion, mappedCurrency); return(new ApiResponse <int>() { Data = response.Data, Success = true }); } catch (ApiException ex) { return(ConvertApiExceptions <int>(ex)); } }
protected override void OnInitialized() { Currency = new CreateCurrencyFrontCommand(); }