コード例 #1
0
        public virtual async Task <T> AddAsync(T entity)
        {
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }
コード例 #2
0
        public async Task <Customer> AddCustomerAsync(Customer customer)
        {
            _dbContext.Set <Customer>().Add(customer);
            await _dbContext.SaveChangesAsync();

            return(customer);
        }
コード例 #3
0
        public async Task <Service> AddServiceAsync(Service service)
        {
            _dbContext.Set <Service>().Add(service);
            await _dbContext.SaveChangesAsync();

            return(service);
        }
コード例 #4
0
        public async Task <Room> AddRoomAsync(Room room)
        {
            _dbContext.Set <Room>().Add(room);
            await _dbContext.SaveChangesAsync();

            return(room);
        }
コード例 #5
0
        public async Task <Roomtype> AddRoomTypeAsync(Roomtype roomType)
        {
            _dbContext.Set <Roomtype>().Add(roomType);
            await _dbContext.SaveChangesAsync();

            return(roomType);
        }