public MapObjectBenchmark() { automapper = AutomapperConfiguration.CreateMapper(); boilerplateMapper = new BoxedMapper(); random = new Random(); // TypeAdapterConfig.GlobalSettings.Compiler = exp => exp.CompileFast(); }
// 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()); }
public MapArrayBenchmark() { this.automapper = AutomapperConfiguration.CreateMapper(); this.boilerplateMapper = new BoxedMapper(); this.random = new Random(); }
public MapObjectBenchmark() { _automapper = AutomapperConfiguration.CreateMapper(); _boilerplateMapper = new DelobytesMapper(); _random = new Random(); }