public void MigrateDatabase(List <Project> projectsToExport)
        {
            // Converts the Projects to Elastic format.
            List <ESProjectDTO> projectsToExportDTOs = ProjectConverter.ProjectsToProjectESDTOs(projectsToExport);

            foreach (ESProjectDTO project in projectsToExportDTOs)
            {
                // Registers an Elastic formatted project at the message broker to be inserted into Elastic DB.
                taskPublisher.RegisterTask(Newtonsoft.Json.JsonConvert.SerializeObject(project), Subject.ELASTIC_CREATE_OR_UPDATE);
            }
        }