All Projects → maikebing → Maikebing.entityframeworkcore.taos

maikebing / Maikebing.entityframeworkcore.taos

Licence: mit
Entity, Framework, EF, Core, Data, O/RM, entity-framework-core,TDengine

Projects that are alternatives of or similar to Maikebing.entityframeworkcore.taos

Entityframework.docs
Documentation for Entity Framework Core and Entity Framework 6
Stars: ✭ 888 (+685.84%)
Mutual labels:  orm, entity-framework, entity-framework-core
Entityframework.lazyloading
LazyLoading for EF Core
Stars: ✭ 23 (-79.65%)
Mutual labels:  orm, entity-framework, entity-framework-core
Pomelo.entityframeworkcore.mysql
Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector
Stars: ✭ 2,099 (+1757.52%)
Mutual labels:  orm, entity-framework, entity-framework-core
Linq2db.entityframeworkcore
Bring power of Linq To DB to Entity Framework Core projects
Stars: ✭ 166 (+46.9%)
Mutual labels:  orm, entity-framework, entity-framework-core
Entityframework.exceptions
Handle database errors easily when working with Entity Framework Core. Supports SQLServer, PostgreSQL, SQLite, Oracle and MySql
Stars: ✭ 266 (+135.4%)
Mutual labels:  entity-framework, entity-framework-core
Efdesigner
Entity Framework visual design surface and code-first code generation for EF6, Core and beyond
Stars: ✭ 256 (+126.55%)
Mutual labels:  entity-framework, entity-framework-core
Efcorepowertools
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization for EF Core
Stars: ✭ 774 (+584.96%)
Mutual labels:  entity-framework, entity-framework-core
Gridify
Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data.
Stars: ✭ 372 (+229.2%)
Mutual labels:  entity-framework, entity-framework-core
Efcore.pg
Entity Framework Core provider for PostgreSQL
Stars: ✭ 838 (+641.59%)
Mutual labels:  entity-framework, entity-framework-core
Impatient
Ain't nobody got time for data
Stars: ✭ 110 (-2.65%)
Mutual labels:  orm, entity-framework-core
Ef6
This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.
Stars: ✭ 1,218 (+977.88%)
Mutual labels:  orm, entity-framework
CodexMicroORM
An alternative to ORM's such as Entity Framework, offers light-weight database mapping to your existing CLR objects. Visit "Design Goals" on GitHub to see more rationale and guidance.
Stars: ✭ 32 (-71.68%)
Mutual labels:  entity-framework, entity-framework-core
EFCore.Cassandra
Entity Framework Core provider for Cassandra
Stars: ✭ 23 (-79.65%)
Mutual labels:  entity-framework, entity-framework-core
Efsecondlevelcache.core
Entity Framework Core Second Level Caching Library
Stars: ✭ 300 (+165.49%)
Mutual labels:  entity-framework, entity-framework-core
reconciler
Update an entity graph in store to a given one by inserting, updating and removing the respective entities.
Stars: ✭ 24 (-78.76%)
Mutual labels:  entity-framework, entity-framework-core
Localization
🌏 Database Resource Localization for .NET Core with Entity Framework and In Memory Cache
Stars: ✭ 68 (-39.82%)
Mutual labels:  entity-framework, entity-framework-core
Entityframework.commontools
Extensions, Auditing, Concurrency Checks, JSON properties and Transaction Logs for EntityFramework and EFCore
Stars: ✭ 82 (-27.43%)
Mutual labels:  entity-framework, entity-framework-core
Blazorwasmefcoreexample
Example of a Blazor WebAssembly project that uses Entity Framework Core on the server for data access.
Stars: ✭ 105 (-7.08%)
Mutual labels:  entity-framework, entity-framework-core
.NET-Core-Learning-Journey
Some of the projects i made when starting to learn .NET Core
Stars: ✭ 37 (-67.26%)
Mutual labels:  entity-framework, entity-framework-core
NETProvider
Firebird ADO.NET Data Provider
Stars: ✭ 113 (+0%)
Mutual labels:  entity-framework, entity-framework-core

Maikebing.EntityFrameworkCore.Taos

项目简介

Entity, Framework, EF, Core, Data, O/RM, entity-framework-core,TDengine

Maikebing.Data.Taos 是一个采用TDengine的原生动态库构建的ADO.Net提供程序。 它将允许你通过.Net Core 访问TDengine 数据库。


Maikebing.EntityFrameworkCore.Taos 是一个Entity Framework Core 的提供器, 基于Maikebing.Data.Taos实现。


Build status License

NuGet名称 版本 下载量 说明
Maikebing.Data.Taos Maikebing.Data.Taos Nuget ADO.Net Core 基础组件
Maikebing.EntityFrameworkCore.Taos Maikebing.EntityFrameworkCore.Taos Nuget 供EF Core使用的组件
Maikebing.HealthChecks.Taos Maikebing.HealthChecks.Taos Nuget 供Asp.Net Core 使用的健康检查组件

TDengine技术开放日 — 从技术创新和设计思想,认识TDengine

荣誉证书

如何使用?

例子:

Example

    ///Specify the name of the database
    string database = "db_" + DateTime.Now.ToString("yyyyMMddHHmmss");
      string database = "db_" + DateTime.Now.ToString("yyyyMMddHHmmss");
      var builder = new TaosConnectionStringBuilder()
      {
            DataSource = "127.0.0.1",
            DataBase = database,
            Username = "root",
            Password = "kissme",
            Port=6060
            };
    //Example for ADO.Net 
    using (var connection = new TaosConnection(builder.ConnectionString))
    {
        connection.Open();
        Console.WriteLine("create {0} {1}", database, connection.CreateCommand($"create database {database};").ExecuteNonQuery());
        Console.WriteLine("create table t {0} {1}", database, connection.CreateCommand($"create table {database}.t (ts timestamp, cdata int);").ExecuteNonQuery());
        Console.WriteLine("insert into t values  {0}  ", connection.CreateCommand($"insert into {database}.t values ('{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ms")}', 10);").ExecuteNonQuery());
        Console.WriteLine("insert into t values  {0} ", connection.CreateCommand($"insert into {database}.t values ('{DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss.ms")}', 20);").ExecuteNonQuery());
        var cmd_select = connection.CreateCommand();
        cmd_select.CommandText = $"select * from {database}.t";
        var reader = cmd_select.ExecuteReader();
        Console.WriteLine(cmd_select.CommandText);
        Console.WriteLine("");
        ConsoleTableBuilder.From(reader.ToDataTable()).WithFormat(ConsoleTableBuilderFormat.MarkDown).ExportAndWriteLine();
        Console.WriteLine("");
        Console.WriteLine("DROP TABLE  {0} {1}", database, connection.CreateCommand($"DROP TABLE  {database}.t;").ExecuteNonQuery());
        Console.WriteLine("DROP DATABASE {0} {1}", database, connection.CreateCommand($"DROP DATABASE   {database};").ExecuteNonQuery());
        connection.Close();
    }
    //Example for  Entity Framework Core  
    using (var context = new TaosContext(new DbContextOptionsBuilder()
                                            .UseTaos(builder.ConnectionString).Options))
    {
        Console.WriteLine("EnsureCreated");
        context.Database.EnsureCreated();
        for (int i = 0; i < 10; i++)
        {
            var rd = new Random();
            context.sensor.Add(new sensor() { ts = DateTime.Now.AddMilliseconds(i), degree = rd.NextDouble(), pm25 = rd.Next(0, 1000) });
        }
        Console.WriteLine("Saveing");
        context.SaveChanges();
        Console.WriteLine("");
        Console.WriteLine("from s in context.sensor where s.pm25 > 0 select s ");
        Console.WriteLine("");
        var f = from s in context.sensor where s.pm25 > 0 select s;
        var ary = f.ToArray();
        ConsoleTableBuilder.From(ary.ToList()).WithFormat(ConsoleTableBuilderFormat.MarkDown).ExportAndWriteLine();
        context.Database.EnsureDeleted();
    }
    Console.WriteLine("");
    Console.WriteLine("Pass any key to exit....");
    Console.ReadKey();

用于物联网的超级表示例:

IoTSharp/Storage/TaosStorage.cs


   using (var connection = new TaosConnection(builder.ConnectionString))
            {
                connection.Open();
                Console.WriteLine("ServerVersion:{0}", connection.ServerVersion);
                connection.CreateCommand("DROP DATABASE IF EXISTS  IoTSharp").ExecuteNonQuery();
                connection.CreateCommand("CREATE DATABASE IoTSharp KEEP 365 DAYS 10 BLOCKS 4;").ExecuteNonQuery();
                connection.ChangeDatabase("IoTSharp");
                connection.CreateCommand("CREATE TABLE IF NOT EXISTS telemetrydata  (ts timestamp,value_type  tinyint, value_boolean bool, value_string binary(10240), value_long bigint,value_datetime timestamp,value_double double)   TAGS (deviceid binary(32),keyname binary(64));").ExecuteNonQuery();
                //connection.CreateCommand($"CREATE TABLE dev_Thermometer USING telemetrydata TAGS (\"Temperature\")").ExecuteNonQuery();
                var devid = $"{Guid.NewGuid():N}";
                UploadTelemetryData(connection, devid, "Temperature", 999);
                UploadTelemetryData(connection,devid,   "Humidity", 888);
                var devid2 = $"{Guid.NewGuid():N}";
                UploadTelemetryData(connection, devid2, "Temperature", 777);
                UploadTelemetryData(connection, devid2, "Humidity", 666);
                var reader2 = connection.CreateCommand("select last_row(*) from telemetrydata group by deviceid,keyname ;").ExecuteReader();
                ConsoleTableBuilder.From(reader2.ToDataTable()).WithFormat(ConsoleTableBuilderFormat.Default).ExportAndWriteLine();
                connection.Close();
            }
            
             static void UploadTelemetryData(  TaosConnection connection, string devid, string keyname, int count)
        {
            for (int i = 0; i < count; i++)
            {
                connection.CreateCommand($"INSERT INTO device_{devid}_{keyname} USING telemetrydata TAGS(\"{devid}\",\"{keyname}\")  (ts,value_type,value_long) values (now,2,{i});").ExecuteNonQuery();
            }
        }
        
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].