I having been trying to query databases from Google Cloud SQL in c#. However, I can't get it working.
I followed the Google Reference pages https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/databases/get and tried to do a simple thing such as get the list of databases first.
and in my .csproj
file, I have imported several apis.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Apis.Auth"/>
<PackageReference Include="Google.Apis.SQLAdmin.v1beta4"/>
<PackageReference Include="Google.Apis"/>
<PackageReference Include='Google.Cloud.Iam.V1' version="1.0.0-beta12" />
<PackageReference Include="Google.Apis.Core" version="1.28.0" />
</ItemGroup>
</Project>
Also, I referred to the Github repo and find examples using BigQuery, PubSub and so on but no Cloud SQL. https://github.com/GoogleCloudPlatform/dotnet-docs-samples
Can someone give some advice or point me to the right direction?
Thank you so much.