Exemplo n.º 1
0
        public IActionResult Index()
        {
            int    count = 0;
            string path  = HttpContext.Request.Path.ToString().Substring(1);
            string str   = System.IO.File.ReadAllText("seeds/" + path + ".json");
            Dictionary <string, string>         model = JsonConvert.DeserializeObject <Dictionary <string, string> >(str);
            List <Dictionary <string, object> > list  = new List <Dictionary <string, object> >();
            ValueGenerator generator = new ValueGenerator(model);

            while (count < 50)
            {
                list.Add(generator.GenerateEntity());
                ++count;
            }

            return(Json(list));
        }