Ejemplo n.º 1
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder.AddAdoNetGrainStorageAsDefault(options =>
     {
         options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
     });
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Configure silo to use AdoNet grain storage as the default grain storage. Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts" />.
        /// </summary>
        /// <remarks>
        /// Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts" />.
        /// </remarks>
        public static ISiloBuilder AddOrleansAdoNetGrainStorageAsDefault <T>(
            this ISiloBuilder builder,
            Action <T> configureOptions)
            where T : AdoNetGrainStorageOptions, new()
        {
            var newAction = new Action <AdoNetGrainStorageOptions>(options => ConvertToAdoNetGrainStorageOptions(configureOptions, options));

            return(builder.AddAdoNetGrainStorageAsDefault(newAction));
        }