/// <summary> /// /// </summary> /// <typeparam name="TDbContext"></typeparam> /// <param name="action"></param> public void PreConfigure <TDbContext>(Action <DbContextConfigurationContext <TDbContext> > action) where TDbContext : ScorpioDbContext <TDbContext> { Check.NotNull(action, nameof(action)); var actions = PreConfigureActions.GetOrAdd(typeof(TDbContext), t => new List <object>()); actions.Add(action); }
/// <summary> /// Pres the configure. /// </summary> /// <typeparam name="TDbContext">The type of the t database context.</typeparam> /// <param name="action">The action.</param> public void PreConfigure <TDbContext>([NotNull] Action <DbContextConfigurationContext <TDbContext> > action) where TDbContext : EfCoreDbContext <TDbContext> { Check.NotNull(action, nameof(action)); var actions = PreConfigureActions.GetOrDefault(typeof(TDbContext)); if (actions == null) { PreConfigureActions[typeof(TDbContext)] = actions = new List <object>(); } actions.Add(action); }