@ -1,3 +1,4 @@
using API ;
using DbContextLib ;
using DbContextLib ;
using Microsoft.AspNetCore.Identity ;
using Microsoft.AspNetCore.Identity ;
using Microsoft.EntityFrameworkCore ;
using Microsoft.EntityFrameworkCore ;
@ -14,9 +15,11 @@ builder.Services.AddEndpointsApiExplorer();
builder . Services . AddSwaggerGen ( ) ;
builder . Services . AddSwaggerGen ( ) ;
builder . Services . AddScoped < IDataService , InquiryDataService > ( ) ;
builder . Services . AddScoped < IDataService , InquiryDataService > ( ) ;
builder . Services . AddDbContext < DbContext , UserDbContext > ( ) ;
builder . Services . AddDbContext < DbContext , UserDbContext > ( ) ;
builder . Services . AddDbContext < WebAPIDbContext > ( options = > options . UseInMemoryDatabase ( "appDb" ) ) ;
builder . Services . AddIdentityApiEndpoints < IdentityUser > ( ) . AddEntityFrameworkStores < WebAPIDbContext > ( ) ;
builder . Services . AddAuthorization ( ) ;
builder . Services . AddAuthorization ( ) ;
builder . Services . AddIdentityApiEndpoints < IdentityUser > ( )
//builder.Services.AddIdentityApiEndpoints<IdentityUser>( )
. AddEntityFrameworkStores < UserDbContext > ( ) ;
// .AddEntityFrameworkStores<UserDbContext>();
builder . Services . AddSwaggerGen ( option = >
builder . Services . AddSwaggerGen ( option = >
{
{
option . SwaggerDoc ( "v1" , new OpenApiInfo { Title = "Demo API" , Version = "v1" } ) ;
option . SwaggerDoc ( "v1" , new OpenApiInfo { Title = "Demo API" , Version = "v1" } ) ;