예제 #1
0
        public async Task <Offices2RoomsEntity> Update(Offices2RoomsEntity entity)
        {
            var updateEntity = _coworkingDBContext.Offices2Rooms.Update(entity);

            await _coworkingDBContext.SaveChangesAsync();

            return(updateEntity.Entity);
        }
예제 #2
0
        public async Task <Offices2RoomsEntity> Add(Offices2RoomsEntity entity)
        {
            await _coworkingDBContext.Offices2Rooms.AddAsync(entity);

            await _coworkingDBContext.SaveChangesAsync();

            return(entity);
        }
예제 #3
0
        public async Task <Offices2RoomsEntity> Update(int idEntity, Offices2RoomsEntity updateEnt)
        {
            var entity = await Get(idEntity);

            entity.RoomId = updateEnt.RoomId;

            _coworkingDBContext.Offices2Rooms.Update(entity);

            await _coworkingDBContext.SaveChangesAsync();

            return(entity);
        }