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); }
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); }