예제 #1
0
        public void Create(DeviceAlarmDto config)
        {
            var entity = config.MapTo <DeviceAlarmEntity>();

            entity.AlarmUUID   = Guid.NewGuid().ToString("N");
            entity.CreateTime  = DateTime.Now;
            entity.Deleted     = false;
            entity.SyncStatus  = false;
            entity.SyncVersion = 0;
            _alarmRepository.Insert(entity);

            Synchronization(entity);
        }
예제 #2
0
 public static DeviceAlarmEntity ToEntity(this DeviceAlarmDto model, DeviceAlarmEntity destination)
 {
     return(model.MapTo(destination));
 }
예제 #3
0
 public static DeviceAlarmEntity ToEntity(this DeviceAlarmDto model)
 {
     return(model.MapTo <DeviceAlarmDto, DeviceAlarmEntity>());
 }