public SmartMeterDto MapToSmartMeterDto(SmartMeter smartmeter) { if (smartmeter != null) { var smartmeterDto = new SmartMeterDto { Id = smartmeter.Id, UserProfileId = smartmeter.UserProfileId, Balance = smartmeter.Balance, Capacity = smartmeter.Capacity, Date = smartmeter.Date, GeneratedPower = smartmeter.GeneratedPower, Load = smartmeter.Load, SMID = smartmeter.SMID, SerialNumber = smartmeter.SerialNumber, CreateDate = smartmeter.CreateDate, ModifiedDate = smartmeter.ModifiedDate, IsDeleted = smartmeter.IsDeleted }; return(smartmeterDto); } return(new SmartMeterDto()); }
public SmartMeter MapToSmartMeter(SmartMeterDto smartmeterDto) { return(new SmartMeter { Id = smartmeterDto.Id, UserProfileId = smartmeterDto.UserProfileId, Balance = smartmeterDto.Balance, Capacity = smartmeterDto.Capacity, Date = smartmeterDto.Date, GeneratedPower = smartmeterDto.GeneratedPower, Load = smartmeterDto.Load, SMID = smartmeterDto.SMID, SerialNumber = smartmeterDto.SerialNumber, CreateDate = smartmeterDto.CreateDate, ModifiedDate = smartmeterDto.ModifiedDate, IsDeleted = smartmeterDto.IsDeleted }); }