Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public IEnumerable<WeatherForecast> Get()
var iteracion = 1;
_logger.LogDebug($"Debug {iteracion}");
_logger.LogInformation($"Information {iteracion}");
_logger.LogWarning($"Warning {iteracion}");
_logger.LogError($"Error {iteracion}");
_logger.LogCritical($"Critical {iteracion}");
throw new NotImplementedException();
catch(Exception ex)
_logger.LogError(ex, ex.Message);
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)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.