DD.WellWorkover.Cloud/ConsoleApp1/Program.cs

37 lines
1.1 KiB
C#

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<AsbCloudDbContext>()
// .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*/)
{
var options = new DbContextOptionsBuilder<AsbCloudDbContext>()
.UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True")
.Options;
var context = new AsbCloudDbContext(options);
//var query = context.Clusters.GetInsertOrUpdateSql(
// new List<Cluster> {
// new Cluster{Caption = "cluster 1", },
// new Cluster{Caption = "cluster 2"},
// });
Console.ReadKey();
}
}
}