예제 #1
0
        public static ASFBuilder AddSQLiteCache(this ASFBuilder builder, string dbConnectionString)
        {
            var options = builder.Services.GetDefaultConfiguration();

            options.DbConnectionString = dbConnectionString;
            builder.Services.AddAnticorrsives(options);
            builder.AddRepositoriesCache(options);
            return(builder);
        }
예제 #2
0
        public static ASFBuilder AddSQLiteCache(this ASFBuilder builder, Action <ASFOptions> startupAction)
        {
            ASFOptions options = new ASFOptions();

            startupAction?.Invoke(options);
            builder.Services.AddAnticorrsives(options);
            builder.AddRepositoriesCache(options);
            return(builder);
        }
예제 #3
0
 public static ASFBuilder AddDbContextCache(this ASFBuilder builder, Action <DbContextOptionsBuilder> configureDbContext)
 {
     builder.Services.AddDbContext <RepositoryContext>(configureDbContext);
     builder.AddRepositoriesCache();
     return(builder);
 }