private static void ProcessLoanDetails()
        {
            GC.Collect();
            while (true)
            {
                Business.PrimaryListings primaryListings = new Business.PrimaryListings();

                var primaryLoan = primaryListings.GetRandomNonDetailedLoan();
                if (primaryLoan == null)
                {
                    Console.WriteLine("Ran out of rows in thread #" + Thread.CurrentThread.ManagedThreadId);
                    Thread.CurrentThread.Abort();
                    break;
                }

                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();
                HtmlWeb  htmlWeb               = new HtmlWeb();
                var      htmlDocumentsPage     = htmlWeb.Load("https://www.mintos.com/en/" + primaryLoan.ID);
                var      getAllTables          = htmlDocumentsPage.DocumentNode.Descendants("table");
                HtmlNode extraInformationTable = getAllTables.ToList()[1];
                var      tableRowDescriptions  = extraInformationTable.SelectNodes(extraInformationTable.XPath + "//td[@class='field-description']");
                var      tableRowValues        = extraInformationTable.SelectNodes(extraInformationTable.XPath + "//td[@class='value']");

                Business.LoanDetails businessLoanDetails = new Business.LoanDetails();
                var loanDetails = businessLoanDetails.GetDetails(tableRowDescriptions, tableRowValues);
                var loanID      = businessLoanDetails.AddDetails(loanDetails);

                primaryListings.UpdateLoanDetailsID(loanID, primaryLoan);

                stopwatch.Stop();
                Console.WriteLine("Thead " + Thread.CurrentThread.ManagedThreadId + " " + primaryLoan.ID + "  Time: " + stopwatch.ElapsedMilliseconds);
            }
        }
        static void Main(string[] args)
        {
            Console.WriteLine("1 - Read CSV file and insert Listings in Database.\n" +
                              "2 - Process Loans with no details\n" +
                              "3 - Process CSV then get Details");
            string userInput = Console.ReadLine();

            if (userInput == "1")
            {
                ProcessCSVFile();
            }

            else if (userInput == "2")
            {
                int i = 0;
                while (i < int.Parse(ConfigurationManager.AppSettings["NumberOfThreads"]))
                {
                    Thread t1 = new Thread(ProcessLoanDetails);
                    t1.Start();
                    i++;
                }
                while (true)
                {
                    Business.PrimaryListings primaryListings = new Business.PrimaryListings();

                    var primaryLoan = primaryListings.GetRandomNonDetailedLoan();
                    if (primaryLoan == null)
                    {
                        break;
                    }
                    Thread.Sleep(5000);
                }
            }

            else if (userInput == "3")
            {
                ProcessCSVFile();
                int i = 0;
                while (i < int.Parse(ConfigurationManager.AppSettings["NumberOfThreads"]))
                {
                    Thread t1 = new Thread(ProcessLoanDetails);
                    t1.Start();
                    i++;
                }
                while (true)
                {
                    Business.PrimaryListings primaryListings = new Business.PrimaryListings();

                    var primaryLoan = primaryListings.GetRandomNonDetailedLoan();
                    if (primaryLoan == null)
                    {
                        break;
                    }
                    Thread.Sleep(5000);
                }
            }
        }