diff --git a/EntityFrameworkCore.API/Program.cs b/EntityFrameworkCore.API/Program.cs index c607f09..c509de9 100644 --- a/EntityFrameworkCore.API/Program.cs +++ b/EntityFrameworkCore.API/Program.cs @@ -1,8 +1,12 @@ using EntityFrameworkCore.Data; using Microsoft.EntityFrameworkCore; +using EntityFrameworkCore.API.Controllers; + var builder = WebApplication.CreateBuilder(args); +builder.Services.AddControllers(); + // Add services to the container. // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi builder.Services.AddOpenApi(); @@ -36,5 +40,6 @@ if (app.Environment.IsDevelopment()) app.UseHttpsRedirection(); +app.MapControllers(); app.Run();