public static IEntityContextServiceCollection <TContext> AddUi <TContext>(this IEntityContextServiceCollection <TContext> services) where TContext : EntityContext { services.Services .AddScoped <UiNodeConverter>() .AddTransient <IUiQuery, UiQuery>(); services.Services .AddMvcCore() .AddApplicationPart(typeof(AspNetCoreDependencyInjectionExtensions).Assembly); return(services); }
public static IEntityContextServiceCollection <TContext> AddMvcAuthentication <TContext>(this IEntityContextServiceCollection <TContext> services) where TContext : EntityContext { services.Services .AddSingleton <IHttpContextAccessor, HttpContextAccessor>() .AddScoped <ISecurityContextProvider <TContext>, AspNetCoreSecurityProvider <TContext> >(); return(services); }