DD.WellWorkover.Cloud/ConsoleApp1/Program.cs
2021-10-05 09:24:25 +05:00

42 lines
1.3 KiB
C#

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using ClosedXML.Excel;
using ClosedXML.Excel.Drawings;
using AsbCloudApp.Data;
using AsbCloudDb.Model;
using Microsoft.EntityFrameworkCore;
using AsbCloudInfrastructure.Services.Cache;
using AsbCloudInfrastructure.Services;
using System.Threading.Tasks;
using System.Threading;
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;
using var db = new AsbCloudDbContext(options);
var cacheDb = new CacheDb();
var wellService = new WellService(db, new TelemetryTracker(), cacheDb);
var wellOptsStat = new WellOperationsStatService(db, cacheDb, wellService);
var tvd = wellOptsStat.GetTvdAsync(1, default).Result;
Console.WriteLine("_");
}
}
}