Fixed controller adding from Api library

This commit is contained in:
2024-07-13 21:59:55 +02:00
parent df93bc410f
commit ec7982471e
9 changed files with 108 additions and 26 deletions

View File

@@ -0,0 +1,15 @@
using HopFrame.Api.Controller;
using HopFrame.Database;
using HopFrame.Security.Authentication;
using Microsoft.Extensions.DependencyInjection;
namespace HopFrame.Api.Extensions;
public static class ServiceCollectionExtensions {
public static void AddHopFrame<TDbContext>(this IServiceCollection services) where TDbContext : HopDbContextBase {
services.AddMvcCore().UseSpecificControllers(typeof(SecurityController<TDbContext>));
services.AddHopFrameAuthentication<TDbContext>();
}
}