Add project files.

This commit is contained in:
2026-09-09 10:12:27 +02:00
parent e46515362e
commit 852b8bca3d
85 changed files with 83240 additions and 0 deletions

View File

@ -0,0 +1,43 @@
using Microsoft.EntityFrameworkCore;
using StockWebHistory.Data;
namespace StockWebHistory
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddDbContext<StockWebDbContext>(options =>
options.UseInMemoryDatabase("StockWebHistoryDB")
);
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.MapStaticAssets();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}")
.WithStaticAssets();
app.Run();
}
}
}