skip to Main Content

HttpGetAttribute name property not working for routing – Asp.net

I have a WebAPI controller named WeatherForecast with one operation. The operation method looks like follow: [HttpGet(Name = "GetWeatherForecast")] public IEnumerable<WeatherForecast> Get() { return Enumerable.Range(1, 5).Select(index => new WeatherForecast { Date = DateTime.Now.AddDays(index), TemperatureC = Random.Shared.Next(-20, 55), Summary = Summaries[Random.Shared.Next(Summaries.Length)]…

VIEW QUESTION
Back To Top
Search