NetPro.Taos
1.0.0
dotnet add package NetPro.Taos --version 1.0.0
NuGet\Install-Package NetPro.Taos -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetPro.Taos" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetPro.Taos --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NetPro.Taos, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NetPro.Taos as a Cake Addin #addin nuget:?package=NetPro.Taos&version=1.0.0 // Install NetPro.Taos as a Cake Tool #tool nuget:?package=NetPro.Taos&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NetPro.Taos使用
对涛思数据库连接对象的简易封装,使用单例TaosConnection对象
使用
appsetting.json
"TaosOption": {
"ConnectionString": [
{
"Key": "taos1", //连接串key别名,唯一
"Value": "Data Source=taos;DataBase=db_20220120141621;Username=root;Password=taosdata;Port=6030" //别名key对应的连接串
}
]
},
启用服务
没有基于NetPro.Web.Api 的使用场景,必须手动进行初始化,如下:
IConfiguration Configuration;
public void ConfigureServices(IServiceCollection services)
{
services.AddTaos(new TaosOption(configuration));
}
基于NetPro.Web.Api的使用,只需要添加引用后配置以上appsetting.josn配置TaosOption节点即可
使用说明
public class TaosService: ITaosService
{
private readonly IdleBus<TaosConnection> _taosdbMulti;
public TaosService(IdleBus<TaosConnection> taosdbMulti)
{
_taosdbMulti = taosdbMulti;
}
/// <summary>
/// 执行Sql
/// </summary>
public void Executesql(string sql)
{
var taos= _taosdbMulti.Get("taos1");
var command= taos.CreateCommand(@"INSERT INTO data_history_67
USING datas TAGS (mongo, 67)
values ( 1608173534840 2 false 'Channel1.窑.烟囱温度' '烟囱温度' '122.00' );");
command.ExecuteReader();
}
}
更新中...
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- IdleBus (>= 1.5.2)
- Maikebing.Data.Taos (>= 2.0.357)
- NetPro.Core (>= 6.0.3-beta.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 195 | 1/20/2022 |