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
        internal static void GetJsonAdexMetadataWithDapper()
        {
            using (var loader = new CvsLoaderMetadata())
            {
                loader.OnMessage += Loader_OnMessage;

                loader.DbConnectionString = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AdexMeta;Integrated Security=True;Connect Timeout=3600;";
                File.WriteAllText(@"C:\Users\julie\source\repos\ImmobilisCommander\ADEX\Adex\Adex.Mvc\wwwroot\data\data.json", JsonConvert.SerializeObject(loader.LinksToJson("", null).ForceDirectedData, Formatting.Indented));

                loader.OnMessage -= Loader_OnMessage;
            }
        }