using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Threading.Tasks;

namespace Bailun.DC.SkuDailyPurchaseAndSales
{
    class Program
    {
        static async Task Main(string[] args)
        {
            Console.WriteLine("每日销进差异汇总");
            var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
            {
                services.AddHostedService<Services>();
            });

            await builder.RunConsoleAsync();
        }

        //static void Main(string[] args)
        //{
        //    var start = DateTime.Parse("2020-11-30");

        //    new Services().Init(start, start.AddDays(1));
        //    return;

        //    while (start.AddDays(1) < DateTime.Now)
        //    {
        //        Console.WriteLine(start.ToString("yyyy-MM-dd"));
        //        new Services().Init(start, start.AddDays(1));
        //        start = start.AddDays(1);
        //    }
        //}

    }
}
