diff --git a/docs/en/07-data-in/01-insert-data.md b/docs/en/07-data-in/01-insert-data.md index b8396632fc049567ed42f6cb374600cd3937d957..db55a2bd4dcc22f9ed905b015f9dc53a5c937cbc 100644 --- a/docs/en/07-data-in/01-insert-data.md +++ b/docs/en/07-data-in/01-insert-data.md @@ -89,7 +89,11 @@ In this example, we use `exec` method to execute SQL. `exec` is designed for som -```C# +``` XML +{{#include docs/examples/csharp/cloud-example/inout/inout.csproj}} +``` + +```csharp {{#include docs/examples/csharp/cloud-example/inout/Program.cs:insert}} ``` diff --git a/docs/en/09-data-out/01-query-data.md b/docs/en/09-data-out/01-query-data.md index 2ac5614b76065ea8aa808176180068200f764980..3810b705aade1e981fc8af5dfb512c9561adb160 100644 --- a/docs/en/09-data-out/01-query-data.md +++ b/docs/en/09-data-out/01-query-data.md @@ -231,6 +231,10 @@ Get all rows and print each row: In this example, we use query method to execute SQL and get a result object. +``` XML +{{#include docs/examples/csharp/cloud-example/inout/inout.csproj}} +``` + ```C# {{#include docs/examples/csharp/cloud-example/inout/Program.cs:query}} ``` diff --git a/docs/en/15-programming/01-connect/06-csharp.md b/docs/en/15-programming/01-connect/06-csharp.md index 1c67a345b1ae2a180c84c3ce55ee06cc6d5e7709..5907e3a9f027afab2007ca330101817e9cba9174 100644 --- a/docs/en/15-programming/01-connect/06-csharp.md +++ b/docs/en/15-programming/01-connect/06-csharp.md @@ -18,7 +18,21 @@ dotnet new console -o example ```bash cd example -dotnet add package TDengine.Connector +vim example.csproj +``` + +Add following ItemGroup and Task to your project file. + +```XML + + + + + + + + + ``` ## Config @@ -59,6 +73,9 @@ Replace with real TDengine cloud DSN. To obtain the real value, please l ## Connect +``` XML +{{#include docs/examples/csharp/cloud-example/connect/connect.csproj}} +``` ```C# {{#include docs/examples/csharp/cloud-example/connect/Program.cs}} diff --git a/docs/en/15-programming/06-connector/06-csharp.md b/docs/en/15-programming/06-connector/06-csharp.md index b745a9c970321020caec8b9482376c82980cb422..1d205f690fa0552e76ea74c689bd1e91af0f4163 100644 --- a/docs/en/15-programming/06-connector/06-csharp.md +++ b/docs/en/15-programming/06-connector/06-csharp.md @@ -23,19 +23,7 @@ dotnet add package TDengine.Connector ## Establishing a connection ``` XML - - - - Exe - net5.0 - enable - - - - - - - +{{#include docs/examples/csharp/cloud-example/connect/connect.csproj}} ``` ``` C# @@ -47,20 +35,7 @@ dotnet add package TDengine.Connector ### Basic Insert and Query ``` XML - - - - Exe - net5.0 - enable - - - - - - - - +{{#include docs/examples/csharp/cloud-example/usage/usage.csproj}} ``` ```C# @@ -70,20 +45,7 @@ dotnet add package TDengine.Connector ### STMT Insert ``` XML - - - - Exe - net5 - enable - - - - - - - - +{{#include docs/examples/csharp/cloud-example/stmt/stmt.csproj}} ``` ```C# @@ -94,7 +56,8 @@ dotnet add package TDengine.Connector | TDengine.Connector | Description | | ------------------------- | ---------------------------------------------------------------- | -| 3.0.1 | Support connect to TDengine cloud service +| 3.0.2 | Support .NET Framework 4.5 and above. Support .Net standard 2.0. Nuget package includes dynamic library for WebSocket.| +| 3.0.1 | Support connect to TDengine cloud service| ## API Reference diff --git a/docs/examples/csharp/cloud-example/connect/connect.csproj b/docs/examples/csharp/cloud-example/connect/connect.csproj index 2a4903745b0d93a8bc5f39a27ef3d1b52e6001a2..214538f4e15426ecff3dfc467edb42e535bb7697 100644 --- a/docs/examples/csharp/cloud-example/connect/connect.csproj +++ b/docs/examples/csharp/cloud-example/connect/connect.csproj @@ -7,7 +7,13 @@ - + + + + + + + diff --git a/docs/examples/csharp/cloud-example/inout/inout.csproj b/docs/examples/csharp/cloud-example/inout/inout.csproj index 34951dc761903e5a4b7a4bec5dfe55a965ab88be..fbcfb9213be9b1917f8861e7832eac4ed0a64037 100644 --- a/docs/examples/csharp/cloud-example/inout/inout.csproj +++ b/docs/examples/csharp/cloud-example/inout/inout.csproj @@ -7,7 +7,13 @@ - + + + + + + + diff --git a/docs/examples/csharp/cloud-example/stmt/stmt.csproj b/docs/examples/csharp/cloud-example/stmt/stmt.csproj index 4a7c03f79c941769f9e4d7c4be46cb0769c084ff..bfdb3c2bb1529e5ad9700ff36682c34a70720f44 100644 --- a/docs/examples/csharp/cloud-example/stmt/stmt.csproj +++ b/docs/examples/csharp/cloud-example/stmt/stmt.csproj @@ -6,8 +6,13 @@ enable - - + + - + + + + + + diff --git a/docs/examples/csharp/cloud-example/usage/usage.csproj b/docs/examples/csharp/cloud-example/usage/usage.csproj index 757d36dc10af7c36b9c87a5876151a5450ef7c84..214538f4e15426ecff3dfc467edb42e535bb7697 100644 --- a/docs/examples/csharp/cloud-example/usage/usage.csproj +++ b/docs/examples/csharp/cloud-example/usage/usage.csproj @@ -6,8 +6,14 @@ enable - - + + + + + + + +