SaeedP
Well-known member
- Joined
- Oct 21, 2020
- Messages
- 116
- Programming Experience
- 3-5
Hello,
By considering this code:
If I don't want to insert data here and return what is in the model what changes should I do?
thanks,
By considering this code:
C#:
[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
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();
}
If I don't want to insert data here and return what is in the model what changes should I do?
thanks,