Example #1
0
        public void Update(RoomDto model)
        {
            var entity = _roomRepository.GetById(model.RoomUUID);

            entity            = model.ToEntity(entity);
            entity.SyncStatus = false;
            _roomRepository.Update(entity);

            Synchronization(entity);
        }
Example #2
0
        public void Insert(RoomDto dto)
        {
            var entity = new RoomEntity();

            entity             = dto.ToEntity();
            entity.RoomUUID    = Guid.NewGuid().ToString("N");
            entity.CreateTime  = DateTime.Now;
            entity.SyncStatus  = false;
            entity.SyncVersion = 0;
            _roomRepository.Insert(entity);

            Synchronization(entity);
        }