Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
|
27247c7b3a | ||
|
d98fe0aa11 | ||
|
7755c19a79 | ||
|
66d7502d01 | ||
|
88fcc46717 |
2 changed files with 7 additions and 1 deletions
BIN
Client/wwwroot/images/test-image.jpg
Normal file
BIN
Client/wwwroot/images/test-image.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -1,4 +1,7 @@
|
|||
using Microsoft.AspNetCore.ResponseCompression;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ShoppingCartStarter.Server.Data;
|
||||
using System.Reflection;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
@ -6,6 +9,8 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
|
||||
builder.Services.AddControllersWithViews();
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddMediatR(Assembly.GetExecutingAssembly());
|
||||
builder.Services.AddDbContext<StoreContext>(options=>options.UseSqlite(builder.Configuration.GetConnectionString("DefaultConnection")));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
@ -13,6 +18,7 @@ var app = builder.Build();
|
|||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseWebAssemblyDebugging();
|
||||
Database.InitialiseDatabase(app, app.Environment);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue