Added ef core integration
All checks were successful
HopFrame CI / build (push) Successful in 46s
HopFrame CI / test (push) Successful in 50s

This commit is contained in:
2026-02-23 16:20:32 +01:00
parent e8ac7eb88a
commit 6730d57771
25 changed files with 929 additions and 63 deletions

View File

@@ -1,3 +1,7 @@
using HopFrame.Core;
using HopFrame.Core.EFCore;
using Microsoft.EntityFrameworkCore;
using TestApplication;
using TestApplication.Components;
var builder = WebApplication.CreateBuilder(args);
@@ -6,6 +10,15 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddEntityFrameworkInMemoryDatabase();
builder.Services.AddDbContext<DatabaseContext>(options => {
options.UseInMemoryDatabase("testing");
});
builder.Services.AddHopFrame(config => {
config.AddDbContext<DatabaseContext>();
});
var app = builder.Build();
// Configure the HTTP request pipeline.