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);
        }
 public CosmosDBMembership(IHttpContextAccessor context, CustomMembershipOptions options, Persistence persistence)
 {
     _context     = context;
     _persistence = persistence;
     Options      = options;
 }