Exemplo n.º 1
0
        public async Task AddCurrencyAsync(Currency currency)
        {
            var duplicate = await Currencies.FirstOrDefaultAsync(x => x.Name == currency.Name);

            if (duplicate == null)
            {
                await Currencies.AddAsync(currency);

                await AddAccountCurrenciesAsync(currency);

                await SaveChangesAsync();
            }
        }