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

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

            return(booking);
        }
예제 #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);
        }
예제 #5
0
        public async Task <T> AddAsync(T entity)
        {
            //Example Movie - Title, Revenue, Budget
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }