Ejemplo n.º 1
0
 public MapObjectBenchmark()
 {
     automapper        = AutomapperConfiguration.CreateMapper();
     boilerplateMapper = new BoxedMapper();
     random            = new Random();
     // TypeAdapterConfig.GlobalSettings.Compiler = exp => exp.CompileFast();
 }
Ejemplo n.º 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.ConfigureApplicationCookie()
            .ConfigureCookiePolicy();
            services.AddDistributedMemoryCache();
            services.AddSessionConfig();

            services.AddDbContextPool <MasterShopDbContext>(options => options.UseSqlServer(Configuration.GetDefaultConnection()))
            .AddIdentity()
            .AddControllersWithViews();

            services.AddRazorPages();

            services.AddTransient <MasterShopDbContext>();
            services.AddTransient <IProductsService, ProductsService>();
            services.AddTransient <ICategoriesService, CategoriesService>();
            services.AddTransient <IOrdersService, OrdersService>();
            services.AddTransient <IUsersService, UsersService>();
            services.AddSingleton(AutomapperConfiguration.CreateMapper());
        }
Ejemplo n.º 3
0
 public MapArrayBenchmark()
 {
     this.automapper        = AutomapperConfiguration.CreateMapper();
     this.boilerplateMapper = new BoxedMapper();
     this.random            = new Random();
 }
Ejemplo n.º 4
0
 public MapObjectBenchmark()
 {
     _automapper        = AutomapperConfiguration.CreateMapper();
     _boilerplateMapper = new DelobytesMapper();
     _random            = new Random();
 }