|
|
@ -1,6 +1,7 @@
|
|
|
|
using API;
|
|
|
|
using API;
|
|
|
|
using DbContextLib;
|
|
|
|
using DbContextLib;
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.Versioning;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
using Services;
|
|
|
|
using Services;
|
|
|
@ -18,6 +19,7 @@ builder.Services.AddDbContext<DbContext, UserDbContext>();
|
|
|
|
builder.Services.AddDbContext<WebAPIDbContext>(options => options.UseInMemoryDatabase("appDb"));
|
|
|
|
builder.Services.AddDbContext<WebAPIDbContext>(options => options.UseInMemoryDatabase("appDb"));
|
|
|
|
builder.Services.AddIdentityApiEndpoints<IdentityUser>().AddEntityFrameworkStores<WebAPIDbContext>();
|
|
|
|
builder.Services.AddIdentityApiEndpoints<IdentityUser>().AddEntityFrameworkStores<WebAPIDbContext>();
|
|
|
|
builder.Services.AddAuthorization();
|
|
|
|
builder.Services.AddAuthorization();
|
|
|
|
|
|
|
|
builder.Services.AddApiVersioning(o => o.ApiVersionReader = new HeaderApiVersionReader("api-version"));
|
|
|
|
//builder.Services.AddIdentityApiEndpoints<IdentityUser>()
|
|
|
|
//builder.Services.AddIdentityApiEndpoints<IdentityUser>()
|
|
|
|
// .AddEntityFrameworkStores<UserDbContext>();
|
|
|
|
// .AddEntityFrameworkStores<UserDbContext>();
|
|
|
|
builder.Services.AddSwaggerGen(option =>
|
|
|
|
builder.Services.AddSwaggerGen(option =>
|
|
|
|