using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using WZExport.Models; using Newtonsoft.Json; namespace WZExport.Pages.DBConfigs { public class IndexModel : PageModel { public List dBConfigs; public void OnGet() { string configStr = System.IO.File.ReadAllText("dBConfig.json"); dBConfigs = JsonConvert.DeserializeObject>(configStr); } } }