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(); } }