DD.WellWorkover.Cloud/ConsoleApp1/Program.cs

48 lines
1.5 KiB
C#

using AsbCloudApp.Data;
using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services;
using AsbCloudInfrastructure.Services.Cache;
//using AsbSaubReport;
//using AutoMapper;
using Microsoft.EntityFrameworkCore;
using System;
namespace ConsoleApp1
{
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 mservice = new MeasureService(context, new CacheDb());
var r = mservice.GetAllLastAsync(1, default).Result;
//var idWell = 1;
//var dataSource = new ReportDataSourcePgCloud(context, idWell);
//var generator = new PdfGenerator(dataSource)
//{
// ReportDirectory = $"{idWell}",
// Begin = DateTime.Now.AddYears(-30),
// End = DateTime.Now.AddYears(30),
// Step = TimeSpan.FromDays(1),
// WithCharts = true,
// WithEvents = true
//};
//generator.OnProgress += Generator_OnProgress;
//var s = generator.GetPagesCount();
//var fileName = generator.Make();
Console.WriteLine("Done. Press any key to quit.");
Console.ReadKey();
}
}
}