public static TemporaryAttachment PopulateTemporaryAttachmentFromIDataReader(IDataReader dr) { TemporaryAttachment temporaryAttachment = new TemporaryAttachment(); temporaryAttachment.AttachmentID = DataRecordHelper.GetGuid(dr, "AttachmentID"); temporaryAttachment.UserID = DataRecordHelper.GetInt32(dr, "UserID"); temporaryAttachment.AttachmentType = (AttachmentType)DataRecordHelper.GetInt32(dr, "AttachmentType"); temporaryAttachment.FileName = DataRecordHelper.GetString(dr, "FileName"); temporaryAttachment.FriendlyFileName = DataRecordHelper.GetString(dr, "FriendlyFileName"); temporaryAttachment.ContentType = DataRecordHelper.GetString(dr, "ContentType"); temporaryAttachment.ContentSize = DataRecordHelper.GetInt64(dr, "ContentSize"); temporaryAttachment.Height = DataRecordHelper.GetInt32(dr, "Height"); temporaryAttachment.Width = DataRecordHelper.GetInt32(dr, "Width"); temporaryAttachment.DisplayOrder = DataRecordHelper.GetInt32(dr, "DisplayOrder"); return(temporaryAttachment); }