示例#1
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="options"></param>
 public DapperHelper(IOptions <DapperOptions> options)
 {
     this._options = options.Value;
 }
示例#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)));
        }
示例#3
0
 public DapperMiddleWare(RequestDelegate next, IOptions <DapperOptions> options)
 {
     this._next    = next;
     this._options = options.Value;
 }