Feature/migrate to minimal api (#662)
* migrate from classic controller to minimal api * fix all PublicApi integration test * update all nuget package add forget project * fix pay now * Adapt readme use in memory database * undo AuthenticateEndpoint to use EndpointBaseAsync * Update README.md Co-authored-by: Steve Smith <steve@kentsmiths.com> Co-authored-by: Steve Smith <steve@kentsmiths.com>
This commit is contained in:
@@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.eShopWeb;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
|
||||
using Microsoft.eShopWeb.Infrastructure.Data;
|
||||
@@ -22,15 +21,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Logging.AddConsole();
|
||||
|
||||
// use real database
|
||||
// Requires LocalDB which can be installed with SQL Server Express 2016
|
||||
// https://www.microsoft.com/en-us/download/details.aspx?id=54284
|
||||
builder.Services.AddDbContext<CatalogContext>(c =>
|
||||
c.UseSqlServer(builder.Configuration.GetConnectionString("CatalogConnection")));
|
||||
|
||||
// Add Identity DbContext
|
||||
builder.Services.AddDbContext<AppIdentityDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("IdentityConnection")));
|
||||
Microsoft.eShopWeb.Infrastructure.Dependencies.ConfigureServices(builder.Configuration, builder.Services);
|
||||
|
||||
builder.Services.AddCookieSettings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user