private async Task AddAccountCurrencyAsync(Account account, Currency currency) { var accountCurrency = new AccountCurrency { Id = Guid.NewGuid(), Account = account, Currency = currency, Value = 0 }; await AccountCurrencies.AddAsync(accountCurrency); }
public async Task <AccountCurrency> GetAccountCurrencyAsync(Guid accountId, string currencyName) { return(await AccountCurrencies.FirstOrDefaultAsync(x => x.AccountId == accountId && x.CurrencyName == currencyName)); }