Innovenergy_trunk/csharp/App/VrmGrabber/Program.cs

36 lines
1007 B
C#
Raw Normal View History

2023-05-04 15:22:58 +00:00
using InnovEnergy.App.VrmGrabber.Database;
2023-04-27 14:59:45 +00:00
using Microsoft.OpenApi.Models;
2023-05-04 15:22:58 +00:00
namespace InnovEnergy.App.VrmGrabber;
2023-04-27 14:59:45 +00:00
public static class Program
{
public static async Task Main(String[] args)
2023-04-27 14:59:45 +00:00
{
2023-06-01 13:29:39 +00:00
var updateTask = Db.UpdateDetailsAndInstallations();
2023-04-27 14:59:45 +00:00
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
2023-06-01 13:29:39 +00:00
// builder.Services.AddSwaggerGen(c =>
// {
// c.UseAllOfToExtendReferenceSchemas();
// c.SupportNonNullableReferenceTypes();
// });
2023-04-27 14:59:45 +00:00
var app = builder.Build();
2023-06-01 13:29:39 +00:00
// app.UseSwagger();
// app.UseSwaggerUI();
// app.UseHttpsRedirection();
2023-04-27 14:59:45 +00:00
app.MapControllers();
2023-05-04 15:22:58 +00:00
// app.MapGet("/", () => Controller.Index());
var webTask = app.RunAsync();
await Task.WhenAll(webTask, updateTask);
2023-04-27 14:59:45 +00:00
}
private static OpenApiInfo OpenApiInfo { get; } = new OpenApiInfo
{
Title = "InnovEnergy VRM Grabber",
Version = "v1"
};
}