internal static void GenerateExcel()
        {
            using (TaxesEntities taxesEntities = new TaxesEntities())
            {
                IQueryable <ExcelProductReport> searchQuery =
                    from e in taxesEntities.Expences
                    join r in taxesEntities.Reports
                    on e.VendorName equals r.VendorName
                    join t in taxesEntities.Taxes
                    on r.ProductName equals t.ProductName
                    where e.CurrentMoth.Month == DateTime.Now.Month
                    group new
                {
                    e,
                    r,
                    t
                } by new
                {
                    e.VendorName,
                } into grouped
                                                select new ExcelProductReport
                {
                    VendorName = grouped.Key.VendorName,
                    Income     = grouped.Sum(x => x.r.TotalIncome),
                    Expences   = grouped.Sum(x => x.e.CurrentExpence),
                    Taxes      = grouped.Sum(x => x.t.Tax1)
                };

                GenerateExcel(searchQuery, "../../report.xlsx");
            }
        }
        public static void FillSQLite()
        {
            using (TaxesEntities taxes = new TaxesEntities())
            {
                var mongo = new MongoDBProvider();

                var allExpences = mongo.ListAllExpenses();
                var allReporst  = mongo.ListAllReports();

                foreach (var report in allReporst)
                {
                    Report reportToInsert = new Report();
                    reportToInsert.TotalIncome       = report.TotalIncomes;
                    reportToInsert.TotalQuantitySold = report.TotalQuantitySold;
                    reportToInsert.VendorName        = report.VendorName;
                    reportToInsert.ProductName       = report.ProductName;

                    taxes.Reports.Add(reportToInsert);
                }

                taxes.SaveChanges();

                foreach (var expence in allExpences)
                {
                    Expence expenceToInsert = new Expence();
                    expenceToInsert.CurrentExpence = expence.CurrentExpense;
                    expenceToInsert.CurrentMoth    = expence.CurrentMonth;
                    expenceToInsert.VendorName     = expence.VendorName;

                    taxes.Expences.Add(expenceToInsert);
                }


                taxes.SaveChanges();
            }
        }