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); }
public static DeviceAlarmEntity ToEntity(this DeviceAlarmDto model, DeviceAlarmEntity destination) { return(model.MapTo(destination)); }
public static DeviceAlarmEntity ToEntity(this DeviceAlarmDto model) { return(model.MapTo <DeviceAlarmDto, DeviceAlarmEntity>()); }