public string GetCurrency(string request)
        {
            var currency = new GetCurrency(Context).Do(request.ToUpper());

            if (currency == null)
            {
                return("Currency not found");
            }
            return(JsonConvert.SerializeObject(currency));
        }
示例#2
0
        public async Task <GetCurrency> GetCurrencyForEdit(EntityDto input)
        {
            var output = new GetCurrency
            {
            };

            var currency = _CurrencyRepository
                           .GetAll().Where(p => p.Id == input.Id).FirstOrDefault();

            output.Currency = currency.MapTo <CreateCurrencyInput>();

            return(output);
        }