Docker + Jenkfins File + v0.1

This commit is contained in:
Marco Santos
2024-11-18 10:42:44 +00:00
parent 964bad93f1
commit 048d3ea82f
32 changed files with 505 additions and 975 deletions

View File

@@ -1,3 +1,6 @@
using GeradoresService.DAL;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
@@ -7,13 +10,16 @@ builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var connectionString = builder.Configuration.GetConnectionString("GeradoresConnection");
builder.Services.AddDbContext<GeradoresContext>(options => options.UseSqlServer(connectionString));
var app = builder.Build();
// Configure the HTTP request pipeline.
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();