diff --git a/Controllers/WeatherForecastController.cs b/Controllers/WeatherForecastController.cs index fd0dc44..c409868 100644 --- a/Controllers/WeatherForecastController.cs +++ b/Controllers/WeatherForecastController.cs @@ -29,4 +29,10 @@ public class WeatherForecastController : ControllerBase }) .ToArray(); } + + [HttpPost] + public void Post(WeatherForecast forecast) + { + Console.WriteLine("Inserting!!! :D"); + } } diff --git a/Program.cs b/Program.cs index b98f6e9..42da172 100644 --- a/Program.cs +++ b/Program.cs @@ -20,7 +20,11 @@ builder.Services.AddDbContext(options => // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +builder.Services.AddSwaggerGen(options => + { + options.SupportNonNullableReferenceTypes(); + } + ); var app = builder.Build();