static async Task RegisterCustomers() { using (var context = new FinancesContext()) { var customers = GetCustomers(); foreach (var customer in customers) { await context.Customers.AddAsync(customer); } await context.SaveChangesAsync(); } }
public async Task AddAsync(User user) { await _context.Users.AddAsync(user); await _context.SaveChangesAsync(); }