using HopFrame.Api.Controller;
using HopFrame.Database;
using HopFrame.Security.Authentication;
using Microsoft.Extensions.DependencyInjection;
namespace HopFrame.Api.Extensions;
public static class ServiceCollectionExtensions {
///
/// Adds all HopFrame endpoints and the HopFrame security layer to the WebApplication
///
/// The service provider to add the services to
/// The data source for all HopFrame entities
public static void AddHopFrame(this IServiceCollection services) where TDbContext : HopDbContextBase {
services.AddMvcCore().UseSpecificControllers(typeof(SecurityController));
services.AddHopFrameAuthentication();
}
}