public static AttendanceDeviceDTO ConvertRespondentInfoToDTO(AttendaceDevice attendancedevice) { Mapper.CreateMap <AttendaceDevice, AttendanceDeviceDTO>().ConvertUsing( m => { return(new AttendanceDeviceDTO { DeviceId = m.DeviceId, DeviceName = m.DeviceName, DeviceIP = m.DeviceIP, DevicePort = m.DevicePort, DevicePassword = m.DevicePassword, DeviceMachineNo = m.DeviceMachineNo, DeviceFetchStartTime = m.DeviceFetchStartTime, DeviceFetchEndTime = m.DeviceFetchEndTime, DeviceLastImportDate = m.DeviceLastImportDate, DeviceStatus = m.DeviceStatus, DeviceDataDelete = m.DeviceDataDelete, DeviceType = m.DeviceType, }); }); return(Mapper.Map <AttendaceDevice, AttendanceDeviceDTO>(attendancedevice)); }
public int UpdateAttendanceDevice(AttendanceDeviceDTO data) { AttendaceDevice attendanceDevice = AttendanceDeviceRequestFormatter.ConvertRespondentInfoFromDTO(data); return(_unitOfWork.AttendanceDeviceRepository.Update(attendanceDevice)); }
public AttendanceDeviceDTO InsertAttendanceDevice(AttendanceDeviceDTO data) { AttendaceDevice attendancedevice = AttendanceDeviceRequestFormatter.ConvertRespondentInfoFromDTO(data); return(AttendanceDeviceRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.AttendanceDeviceRepository.Create(attendancedevice))); }