public virtual async Task <T> AddAsync(T entity)
        {
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }
Exemplo n.º 2
0
        public async Task <Customer> AddCustomerAsync(Customer customer)
        {
            _dbContext.Set <Customer>().Add(customer);
            await _dbContext.SaveChangesAsync();

            return(customer);
        }
        public async Task <Service> AddServiceAsync(Service service)
        {
            _dbContext.Set <Service>().Add(service);
            await _dbContext.SaveChangesAsync();

            return(service);
        }
Exemplo n.º 4
0
        public async Task <Room> AddRoomAsync(Room room)
        {
            _dbContext.Set <Room>().Add(room);
            await _dbContext.SaveChangesAsync();

            return(room);
        }
Exemplo n.º 5
0
        public async Task <Roomtype> AddRoomTypeAsync(Roomtype roomType)
        {
            _dbContext.Set <Roomtype>().Add(roomType);
            await _dbContext.SaveChangesAsync();

            return(roomType);
        }