public void Sync(AddGateDto input) { var gate = Read <Gate>(t => t.DeviceNumber == input.DeviceNumber); if (gate != null) { var entity = input.MapTo <Gate>(); AddAndSave(entity); } }
public void Add(AddGateDto input) { var gate = input.MapTo <Gate>(); AddAndSave(gate); }