Exemple #1
0
        public async Task Create(Log log, List <User> users)
        {
            if (users.Count > 0)
            {
                foreach (var user in users)
                {
                    user.Logs.Add(new LogUser
                    {
                        Log  = log,
                        User = user
                    });

                    _dbContext.MyUsers.Update(user);
                }
            }
            await _dbContext.Logs.AddAsync(log);

            _dbContext.SaveChanges();
        }
Exemple #2
0
        public async Task Create(Flight flight)
        {
            await _dbContext.Flights.AddAsync(flight);

            _dbContext.SaveChanges();
        }
Exemple #3
0
        public async Task Create(Booking booking)
        {
            await _dbContext.Bookings.AddAsync(booking);

            _dbContext.SaveChanges();
        }