Esempio n. 1
0
 public async Task SeedAsync(UserIdentityContext context, ILogger <UserIdentityContextSeed> logger)
 {
     var policy = CreatePolicy(logger, nameof(UserIdentityContextSeed));
     await policy.ExecuteAsync(async() =>
     {
         if (!context.Plans.Any())
         {
             await context.Plans.AddRangeAsync(GetPreconfiguredPlans());
             await context.SaveChangesAsync();
         }
     });
 }
Esempio n. 2
0
 public UserRepository(UserIdentityContext identityContext)
 {
     _identityContext = identityContext;
 }