Created AdminContext handling

This commit is contained in:
2024-09-30 19:01:39 +02:00
parent 672f0fd2c3
commit 66ddc22012
33 changed files with 582 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
using HopFrame.Web.Admin.Generators.Implementation;
using Microsoft.Extensions.DependencyInjection;
namespace HopFrame.Web.Admin;
public static class ServiceCollectionExtensions {
public static IServiceCollection AddAdminContext<TContext>(this IServiceCollection services) where TContext : AdminPagesContext {
services.AddSingleton(_ => {
var generator = new AdminContextGenerator();
return generator.CompileContext<TContext>();
});
return services;
}
}