Unlock Aerospike Cloud: Exploring the power of the Aerospike LINQPad driver
Tags: csharp, linqpad, cloud
Published: 2024-02-28 02:05:46


![](https://developer-hub.s3.us-west-1.amazonaws.com/richard-andersen/unlock-aerospike-cloud-exploring-power-of-linqpad-driver-1_1709081514432.webp)

This blog is part of a continuing series showing how to use the Aerospike LINQPad driver. For other blogs in this series, please see:
- [Aerospike for LINQPad](https://aerospike.com/developer/blog/aerospike-for-linqpad)
- [How to use auto-values in the Aerospike LINQPad driver](https://aerospike.com/developer/blog/how-to-use-auto-values-in-nosql-linqpad-driver)

The Aerospike LINQPad driver is now able to connect to the Aerospike Cloud, providing all the power of [LINQPad](https://www.linqpad.net/nugetsamples.aspx) combined with the [Aerospike LINQPad driver](https://github.com/aerospike-community/aerospike-linqpad-driver/tree/main/linqpad-samples).
<!--truncate-->
This includes a graphical interface, [LINQ](https://learn.microsoft.com/en-us/dotnet/csharp/linq/) support, and enhanced driver features to support the Aerospike Database. Find more information about LINQPad [here](https://www.linqpad.net/).

Let’s look at the new connection dialog and some of the features of the LINQPad driver.

## Connection dialog

The new connection dialog will now have two tabs. The first tab will be for native, “self-managed”, Aerospike clusters, and the second tab is used to connect to [Aerospike Cloud](https://aerospike.com/docs/cloud). 

Below shows the connection properties:

<figure>
<img src="https://developer-hub.s3.us-west-1.amazonaws.com/richard-andersen/unlock-aerospike-cloud-exploring-the-power-of-the-aerospike-linqpad-driver-connection-dialog_1709081474856.png" />
<figcaption>Aerospike Cloud connection dialog</figcaption>
</figure>


A review of each property is below:
1. The host name is provided in the cloud dashboard. The hyperlink will take you to the Aerospike login screen or,  if you are already logged in, to the dashboard.
1. The cloud client connection port.
1. If a VPC (AWS private link) is defined, this would be the host name displayed on the cloud dashboard. The host name field would be the VPC endpoint.
1. The API key is created via the dashboard.
1. If the API key and secret were exported from the dashboard to your local machine, this button will allow you to import that API Key CSV file. Properties “API Key” (item 4) and “API Secret” (item 7) are not required.
1. If enabled, the built-in LINQPad password manager is used. When enabled, a dropdown will be displayed to select the Password Name you defined in the manager. The Password Manager can be found on the File menu of LINQPad.
1. The associated API Key’s secret.
1. If checked, it will show the API secret in plain text.
1. The associated cloud namespace.
1. If provided, a list of set names separated by a comma or space. The set names will be used to populate the sets under the namespace in the LINQPad connection tree (see below image). Also, set and bin “detection” will be performed to obtain the bins and data types. Regardless of whether this field is provided, you can always obtain this information from the “Null Set.” See the “Using Null Set” section below.
1. Hyperlinks to additional topics.
1. The timeout values that will be used when obtaining the connection or performing an operation. Note that the “Sleep” field is ignored for cloud connections.

Below shows the relationship between the “set names” connection property and the LINQPad connection tree:

<figure>
<img src="https://developer-hub.s3.us-west-1.amazonaws.com/richard-andersen/unlock-aerospike-cloud-exploring-the-power-of-the-aerospike-linqpad-driver-connection-tree-set-names_1709081474940.png" />
<figcaption>Association between the “Set Names” property and the sets populated in the connection tree</figcaption>
</figure>

## Driver overview

All the features of the Aerospike LINQPad driver are available, including the following:
- Graphical interface with all LINQPad features
- Drag-and-drop of set names
- LINQ
- Serialize and deserialize any C# object via the Object-Mapper (POCO)
- Auto-Values, which provide dynamic data type conversion from Aerospike types to .Net types without testing or casting
- JSON support
- Explore the Aerospike API directly or use the driver’s enhanced API

![](https://developer-hub.s3.us-west-1.amazonaws.com/richard-andersen/unlock-aerospike-cloud-exploring-the-power-of-the-aerospike-linqpad-driver-2_1709081474438.gif)

<figure>
<img src="https://developer-hub.s3.us-west-1.amazonaws.com/richard-andersen/unlock-aerospike-cloud-exploring-the-power-of-the-aerospike-linqpad-driver-1_1709081473558.gif" />
<figcaption>Demonstrates some of the capabilities of LINQPad and the LINQPad driver</figcaption>
</figure>

## Using the Aerospike null set

If the “Set Names” connection property is not provided, the set and bin names will not be provided in the LINQPad connection tree (see image above).
You can still perform queries and API calls using the driver’s API features. Below is an example of a driver API call to obtain the records for Aerospike set “Artist”:

`aerospike_cloud.NullSet.Where(ns => ns.Aerospike.SetName == "Artist")`

Below is the output:

<figure>
<img src="https://developer-hub.s3.us-west-1.amazonaws.com/richard-andersen/unlock-aerospike-cloud-exploring-the-power-of-the-aerospike-linqpad-driver-extended-api_1709081475084.png" />
<figcaption>Result using the driver’s extended API for set “Artist”</figcaption>
</figure>

You can always extend the “where” clause or interact with the result set.

## Samples

You can find samples for Aerospike LINQPad Cloud under the [samples folder](https://github.com/aerospike-community/aerospike-linqpad-driver/tree/main/linqpad-samples/Cloud) or under the “Samples” tab in LINQPad.

## Review
In this installment of the Aerospike LINQPad driver blog series, we learned how to use LINQPad to connect to Aerospike Cloud. This connection makes exploring your data in the cloud just as easy as other deployment options. Stay tuned for more articles in this series highlighting additional features of the driver.