예제 #1
0
 public static IdentityBuilder AddDefaultMultiTenantIdentityServices
 <TUserIdentity, TUserIdentityRole, TUserStore, TRoleStore>
     (this IdentityBuilder builder)
     where TUserIdentity : class
     where TUserIdentityRole : class
     where TRoleStore : class
     where TUserStore : class
 {
     return(builder.AddDefaultMultiTenantIdentityServices <TUserIdentity, TUserIdentityRole, TUserStore, TRoleStore>(true));
 }
예제 #2
0
        public static IdentityBuilder AddDefaultMultiTenantIdentityServices
        <TUserIdentity, TUserIdentityRole, TUserStore, TRoleStore>
            (this IServiceCollection services)
            where TUserIdentity : class
            where TUserIdentityRole : class
            where TRoleStore : class
            where TUserStore : class
        {
            var builder = new IdentityBuilder(typeof(TUserIdentity), typeof(TUserIdentityRole), services);

            return(builder.AddDefaultMultiTenantIdentityServices <TUserIdentity, TUserIdentityRole, TUserStore, TRoleStore>(true));
            //services.AddScoped(typeof(IUserStore<>).MakeGenericType(typeof(TUserIdentity)), typeof(TUserStore));
            //services.AddScoped(typeof(IRoleStore<>).MakeGenericType(typeof(TUserIdentityRole)), typeof(TRoleStore));

            //return services;
        }