Esempio n. 1
0
        public static GraphDataSet LoadSampleFromMetadataDatabase(int?size)
        {
            GraphDataSet retour = null;

            RewriteSampleFiles(size);

            using (var loader = new CvsLoaderMetadata())
            {
                loader.OnMessage += Loader_OnMessage;

                loader.DbConnectionString = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AdexMeta;Integrated Security=True;";
                loader.LoadReferences();

                loader.LoadProviders(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\entreprise_2020_08_01_04_00.csv"));
                loader.LoadLinks(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\declaration_avantage_2020_08_01_04_00.csv"));
                loader.LoadLinks(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\declaration_convention_2020_08_01_04_00.csv"));
                loader.LoadLinks(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\declaration_remuneration_2020_08_01_04_00.csv"));

                retour = loader.LinksToJson(null, size);

                loader.OnMessage -= Loader_OnMessage;
            }

            return(retour);
        }
Esempio n. 2
0
        public static void FillAdexMetadataWithDapper()
        {
            using (var loader = new CvsLoaderMetadata())
            {
                loader.OnMessage += Loader_OnMessage;

                loader.DbConnectionString = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AdexMeta;Integrated Security=True;";
                loader.LoadReferences();

                loader.LoadProviders(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\big_entreprise_2020_08_01_04_00.csv"));
                loader.LoadLinks(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\big_declaration_avantage_2020_08_01_04_00.csv"));
                loader.LoadLinks(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\big_declaration_convention_2020_08_01_04_00.csv"));
                loader.LoadLinks(Path.Combine(_dataRootPath, @"ImmobilisCommander\ADEX\Data\big_declaration_remuneration_2020_08_01_04_00.csv"));

                loader.OnMessage -= Loader_OnMessage;
            }
        }