Example #1
0
        public async Task <Cab> AddAsync(Cab cab)
        {
            _dbContext.Cabs.Add(cab);
            await _dbContext.SaveChangesAsync();

            return(cab);
        }
Example #2
0
        public async Task <Booking> AddAsync(Booking booking)
        {
            _dbContext.Bookings.Add(booking);
            await _dbContext.SaveChangesAsync();

            return(booking);
        }
Example #3
0
        public async Task <Place> AddAsync(Place place)
        {
            _dbContext.Places.Add(place);
            await _dbContext.SaveChangesAsync();

            return(place);
        }
        public async Task <BookingHistory> AddAsync(BookingHistory history)
        {
            _dbContext.BookingHistories.Add(history);
            await _dbContext.SaveChangesAsync();

            return(history);
        }
Example #5
0
        public async Task <T> AddAsync(T entity)
        {
            //Example Movie - Title, Revenue, Budget
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }