|
Last change
on this file since 618be76 was 618be76, checked in by imbrsk <boris696boris@…>, 11 months ago |
|
Implement user management features with database integration
|
-
Property mode
set to
100644
|
|
File size:
632 bytes
|
| Rev | Line | |
|---|
| [618be76] | 1 | using Microsoft.EntityFrameworkCore;
|
|---|
| 2 |
|
|---|
| [c11d3a3] | 3 | var builder = WebApplication.CreateBuilder(args);
|
|---|
| 4 |
|
|---|
| 5 | // Add services to the container.
|
|---|
| 6 |
|
|---|
| 7 | builder.Services.AddControllers();
|
|---|
| 8 | // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
|---|
| 9 | builder.Services.AddOpenApi();
|
|---|
| 10 |
|
|---|
| 11 | var app = builder.Build();
|
|---|
| 12 |
|
|---|
| 13 | // Configure the HTTP request pipeline.
|
|---|
| 14 | if (app.Environment.IsDevelopment())
|
|---|
| 15 | {
|
|---|
| 16 | app.MapOpenApi();
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| [618be76] | 19 | builder.Services.AddDbContext<AppDbContext>(options =>
|
|---|
| 20 | options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| [c11d3a3] | 23 | app.UseHttpsRedirection();
|
|---|
| 24 |
|
|---|
| 25 | app.UseAuthorization();
|
|---|
| 26 |
|
|---|
| 27 | app.MapControllers();
|
|---|
| 28 |
|
|---|
| 29 | app.Run();
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.