Пример #1
0
        public static IApplicationBuilder UseDapper(this IApplicationBuilder builder, DapperOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            return builder.UseMiddleware<DapperMiddleWare>(Options.Create(options));
        }
Пример #2
0
        public static IApplicationBuilder UseDapper(this IApplicationBuilder builder, DapperOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            return(builder.UseMiddleware <DapperMiddleWare>(Options.Create(options)));
        }