private datamod.BarcodeScanLog BuildLogRecord(Guid barcodeGuid) { var barcodeScanLog = new datamod.BarcodeScanLog() { BarcodeId = barcodeGuid, BarcodeScanLogId = Guid.NewGuid(), CreatedBy = DataRetrievalService.GetCurrentUserId().ToString(), //TODO: rts - convert to username CreatedUtcDate = DateTime.UtcNow, DeviceOperatingSystem = Device.RuntimePlatform, DeviceOperatingSystemVersion = DeviceInfo.VersionString, //Latitude = location != null ? (Double?)location.Latitude : null, IsDeleted = false, ModifiedBy = DataRetrievalService.GetCurrentUserId().ToString(), //TODO: rts - convert to username ModifiedUtcDate = DateTime.UtcNow, UserId = DataRetrievalService.GetCurrentUserId() }; if (location != null) { barcodeScanLog.Latitude = location.Latitude; barcodeScanLog.Longitude = location.Longitude; } return(barcodeScanLog); }