Innovenergy_trunk/csharp/App/VrmGrabber/Program.cs

36 lines
1007 B
C#

using InnovEnergy.App.VrmGrabber.Database;
using Microsoft.OpenApi.Models;
namespace InnovEnergy.App.VrmGrabber;
public static class Program
{
public static async Task Main(String[] args)
{
var updateTask = Db.UpdateDetailsAndInstallations();
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
// builder.Services.AddSwaggerGen(c =>
// {
// c.UseAllOfToExtendReferenceSchemas();
// c.SupportNonNullableReferenceTypes();
// });
var app = builder.Build();
// app.UseSwagger();
// app.UseSwaggerUI();
// app.UseHttpsRedirection();
app.MapControllers();
// app.MapGet("/", () => Controller.Index());
var webTask = app.RunAsync();
await Task.WhenAll(webTask, updateTask);
}
private static OpenApiInfo OpenApiInfo { get; } = new OpenApiInfo
{
Title = "InnovEnergy VRM Grabber",
Version = "v1"
};
}