public CosmosDBMembership(IHttpContextAccessor context, CustomMembershipOptions options, IUserRepository userRepository, ISessionRepository sessionRepository) { _context = context; _userRepository = userRepository; _sessionRepository = sessionRepository; Options = options; }
public static IServiceCollection AddCustomMembership <T>(this IServiceCollection services, Action <CustomMembershipOptions> options) where T : class, ICustomMembership { services.AddTransient <ICustomMembership, T>(); services.AddTransient <CustomMembershipOptions>((s) => { var opts = new CustomMembershipOptions(); options(opts); return(opts); }); return(services); }