To develop an HTTP API with minimal dependencies prior to .NET Core 6.0, you can follow these steps:
return Ok(products);
products.Add(product); return CreatedAtAction(nameof(GetProducts), new { id = product.Id }, product);
products.Add(product);
return CreatedAtAction(nameof(GetProducts), new { id = product.Id }, product);
app.UseDeveloperExceptionPage();
endpoints.MapControllers();