Skip to content

Commit

Permalink
Merge pull request #155 from Vandana-Rajamani/master
Browse files Browse the repository at this point in the history
SDK code examples
  • Loading branch information
mikebrey authored Jan 30, 2024
2 parents b64809a + f5f22c9 commit 87327ec
Show file tree
Hide file tree
Showing 78 changed files with 13,650 additions and 230 deletions.
441 changes: 441 additions & 0 deletions examples-nosql-dotnet-sdk/sqlexamples/AddBagData.cs

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions examples-nosql-dotnet-sdk/sqlexamples/AddData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ public class AddData
public static async Task Main(string[] args)
{
try {
// if using cloud service uncomment the code below, else if using onPremises comment it
// if using cloud service uncomment the code below,
//else if using onPremises comment it
var client = await getconnection_cloud();
// if using onPremise uncomment the code below, else if using cloud service comment it
// if using onPremise uncomment the code below,
//else if using cloud service comment it
// var client = await getconnection_onPrem();
Console.WriteLine("Created NoSQLClient instance");
await crtTabAddData(client);
Expand All @@ -269,7 +271,7 @@ public static async Task Main(string[] args)
// Get a connection handle for Oracle NoSQL Database Cloud Service
private async static Task<NoSQLClient> getconnection_cloud()
{
// replace the region and compartment place holders with the actual values
// replace the region and compartment place holders with actual values
var client = new NoSQLClient(new NoSQLConfig
{
Region = <your_region_identifier>,
Expand Down
8 changes: 5 additions & 3 deletions examples-nosql-dotnet-sdk/sqlexamples/AlterTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ public class AlterTable
public static async Task Main(string[] args)
{
try {
// if using cloud service uncomment the code below, else if using onPremises comment it
// if using cloud service uncomment the code below,
// else if using onPremises comment it
var client = await getconnection_cloud();
// if using onPremise uncomment the code below, else if using cloud service comment it
// if using onPremise uncomment the code below,
// else if using cloud service comment it
// var client = await getconnection_onPrem();
Console.WriteLine("Created NoSQLClient instance");
await createTable(client);
Expand All @@ -49,7 +51,7 @@ public static async Task Main(string[] args)
// Get a connection handle for Oracle NoSQL Database Cloud Service
private async static Task<NoSQLClient> getconnection_cloud()
{
// replace the region and compartment place holders with the actual values
// replace the region and compartment place holders with actual values
var client = new NoSQLClient(new NoSQLConfig
{
Region = <your_region_identifier>,
Expand Down
10 changes: 6 additions & 4 deletions examples-nosql-dotnet-sdk/sqlexamples/CreateTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ public class CreateTable {
public static async Task Main(string[] args)
{
try {
// if using cloud service uncomment the code below, else if using onPremises comment it
// if using cloud service uncomment the code below,
// else if using onPremises comment it
var client = await getconnection_cloud();
// if using onPremise uncomment the code below, else if using cloud service comment it
// if using onPremise uncomment the code below,
// else if using cloud service comment it
// var client = await getconnection_onPrem();
Console.WriteLine("Created NoSQLClient instance");
await createTable(client);
Expand All @@ -46,11 +48,11 @@ public static async Task Main(string[] args)
// Get a connection handle for Oracle NoSQL Database Cloud Service
private async static Task<NoSQLClient> getconnection_cloud()
{
// replace the region and compartment place holders with the actual values
// replace the region and compartment place holders with actual values
var client = new NoSQLClient(new NoSQLConfig
{
Region = <your_region_identifier>,
Compartment = "<your_compartment_ocid"
Compartment = "<your_compartment_ocid>"
});
return client;
}
Expand Down
Loading

0 comments on commit 87327ec

Please sign in to comment.