public async Task <IActionResult> Index() { var arrayExample = new ArrayExample(); _config.GetSection("array").Bind(arrayExample); ArrayExample ArrayExample = _config.GetSection("array").Get <ArrayExample>(); var entries = _config.GetValue <Array>("entries"); var configSection = _config.GetSection("section1"); var jsonTest = _config.GetSection("json_array").Get <JsonTest>(); WebMvc.Models.BusinessModel.Task model = new Models.BusinessModel.Task(); model.Subject = "abcke"; model.Description = "第一个ovrn"; _context.tasks.Add(model); await _context.SaveChangesAsync(); return(View()); }
public ContentResult OnGet() { _array = Config.GetSection("array").Get <ArrayExample>(); string s = null; for (int j = 0; j < _array.Entries.Length; j++) { s += $"Index: {j} Value: {_array.Entries[j]} \n"; } return(Content(s)); }
public void TestExample() { ArrayExample example = serializer.Read(ArrayExample.class, SOURCE);