Exemple #1
0
        public async Task <BitCoinAddress> GetPrimaryAddressAsync(string UserId)
        {
            var list = await Task.Run(() => _db.BitCoinAddress.ToList().FindAll(x => x.UserId == UserId));

            BitCoinAddress primary = list.FirstOrDefault(x => x.Primary == true);

            return(primary);
        }
Exemple #2
0
        public async Task AddAddressAsync(BitCoinAddress bitcoinAddress)
        {
            await Task.Run(() => _db.BitCoinAddress.Add(bitcoinAddress));

            await _db.SaveChangesAsync();
        }