Esempio n. 1
0
        public async Task <Account> Get(Guid id)
        {
            var account = await _context.Accounts.FindAsync(id);

            if (account != null)
            {
                await _context.Entry(account)
                .Collection(i => i.Transactions)
                .LoadAsync();
            }

            return(account);
        }
Esempio n. 2
0
 public async Task Update(Customer customer)
 {
     _context.Entry(customer).State = EntityState.Modified;
     await _context.SaveChangesAsync();
 }