예제 #1
0
        public Fixture()
        {
            Store = new DummyDataStore(false);

            UserService    = new UserService(Store);
            ProductService = new ProductService(Store);
            OrderService   = new OrderService(Store, UserService, ProductService);
        }
예제 #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                DummyDataStore.GenerateData();
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UsePlayground();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.MapGraphQL();
            });
        }