public IEnumerable <WeatherForecast> Get() { var demos = _demoRepo.GetDemos(); Console.WriteLine(JsonConvert.SerializeObject(demos)); Console.WriteLine($"config:{_configuration["consul_config"]}"); //var aa= _configuration.GetValue<string>("MySettings:ApplicationName"); //.GetSection("Data").GetSection("ConnectionString").Value; var rng = new Random(); return(Enumerable.Range(1, 5).Select(index => new WeatherForecast { Date = DateTime.Now.AddDays(index), TemperatureC = rng.Next(-20, 55), Summary = Summaries[rng.Next(Summaries.Length)] }) .ToArray()); }
public Demo GetDemos() { return(_demoRepo.GetDemos()); }
public List <Demo> GetDemos() { return(_demoRepo.GetDemos()); }