public void Update(RoomDto model) { var entity = _roomRepository.GetById(model.RoomUUID); entity = model.ToEntity(entity); entity.SyncStatus = false; _roomRepository.Update(entity); Synchronization(entity); }
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); }