using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using AsbCloudDb.Model; using AsbCloudDb; using Google.Apis.Drive.v3.Data; using Microsoft.EntityFrameworkCore; namespace ConsoleApp1 { //var options = new DbContextOptionsBuilder() // .UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True") // .Options; //var context = new AsbCloudDbContext(options); class Program { static void Main(/*string[] args*/) { DbDemoDataService.AddDemoData(); //.GetAwaiter().GetResult(); Console.WriteLine("End of Test"); Console.ReadLine(); //var options = new DbContextOptionsBuilder() // .UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True") // .Options; //var context = new AsbCloudDbContext(options); //var sett = context.Set(); //var r = context.Database.ExecInsertOrUpdateAsync(sett, new List { // new TelemetryDataSaub // { // Date = DateTime.Now, // IdTelemetry = 3, // AxialLoad = 100.1f, // }, // new TelemetryDataSaub // { // Date = DateTime.Now.AddSeconds(2), // IdTelemetry = 3, // AxialLoad = 100.2f, // }, //}, System.Threading.CancellationToken.None).Result; } } }