Exemple #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);
        }
        public async Task <ActionResult> Search(string txt)
        {
            using (var loader = new CvsLoaderMetadata())
            {
                loader.DbConnectionString = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AdexMeta;Integrated Security=True;Connect Timeout=3600;";
                loader.OnMessage         += Loader_OnMessage;

                return(new JsonResult(loader.Search(txt)));
            }
        }
        public async Task <ActionResult> GetInformation(string reference)
        {
            using (var loader = new CvsLoaderMetadata())
            {
                loader.DbConnectionString = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AdexMeta;Integrated Security=True;Connect Timeout=3600;";
                loader.OnMessage         += Loader_OnMessage;

                return(new JsonResult(loader.GetBeneficiary(reference)));
            }
        }
Exemple #4
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;
            }
        }
Exemple #5
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;
            }
        }