DD.WellWorkover.Cloud/ConsoleApp1/Program.cs

48 lines
1.5 KiB
C#
Raw Normal View History

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
{
2021-07-28 09:47:13 +05:00
static void Main(/*string[] args*/)
{
2021-07-28 09:47:13 +05:00
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;
2021-07-27 14:43:30 +05:00
//var idWell = 1;
//var dataSource = new ReportDataSourcePgCloud(context, idWell);
//var generator = new PdfGenerator(dataSource)
//{
2021-07-27 14:43:30 +05:00
// ReportDirectory = $"{idWell}",
// Begin = DateTime.Now.AddYears(-30),
// End = DateTime.Now.AddYears(30),
// Step = TimeSpan.FromDays(1),
// WithCharts = true,
// WithEvents = true
//};
2021-04-23 10:21:25 +05:00
//generator.OnProgress += Generator_OnProgress;
//var s = generator.GetPagesCount();
//var fileName = generator.Make();
2021-04-23 10:21:25 +05:00
2021-04-08 17:54:02 +05:00
Console.WriteLine("Done. Press any key to quit.");
Console.ReadKey();
}
2021-04-07 18:01:56 +05:00
}
}