[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

.NET Cloud Spanner Samples

A collection of samples that demonstrate how to call the Google Cloud Spanner API from C#.

The Quickstart requires .NET 6 or later. That means using Visual Studio 2022, or the command line. The samples target .NET Standard 2.1.

Build and Run the Quickstart

  1. Follow the set-up instructions in the documentation.

  2. Enable APIs for your project. Click here to visit Cloud Platform Console and enable the Google Cloud Spanner API.

  3. In the Cloud Console, create a Cloud Spanner instance and then create a database on that instance.

  4. Edit QuickStart\Program.cs, and replace YOUR-PROJECT-ID with id of the project you created in step 1. Also, update "my-instance" and "my-database" with the id's of the instance and database you created in step 3.

  5. From a Powershell command line, run the QuickStart sample:

    PS C:\...\dotnet-docs-samples\spanner\api\QuickStart> dotnet run
    Hello World
    

Contributing changes

Licensing

Testing