I am pretty new to .net and also minimal API's. I am trying to create a web API that calls another API. The Fuel Controller is the API that I will be calling and after dependency injection I am trying to call it with the app.MapGet() function which should return the results. Below is my program.cs
IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices((context, services) =>
{
services.AddEndpointsApiExplorer();
services.AddSwaggerGen();
services.AddOptions<FuelControllerOptions>()
.Bind(context.Configuration.GetSection("FuelControllerSettings"));
services.AddSingleton<IFuelController, FuelController>();
services.AddHostedService<Worker>();
}).Build();
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
ILogger logger = app.Logger;
app.MapGet("/", (FuelController fc) =>
{
});