コード例 #1
0
 public static IApplicationBuilder UseDbObservables(this IApplicationBuilder app, Action <IDbObservablesBuilder> configureDbObservables)
 {
     if (configureDbObservables == null)
     {
         throw new ArgumentNullException(nameof(configureDbObservables));
     }
     configureDbObservables.Invoke(DbObservablesBuilderFactory.Create(app.ApplicationServices));
     return(app);
 }
コード例 #2
0
        public static IHost UseDbObservables(this IHost host, Action <IDbObservablesBuilder> configureDbObservables)
        {
            if (configureDbObservables == null)
            {
                throw new ArgumentNullException(nameof(configureDbObservables));
            }
            var dbObservablesBuilder = DbObservablesBuilderFactory.Create(host.Services);

            configureDbObservables.Invoke(dbObservablesBuilder);
            return(host);
        }