Пример #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, TelemetryDataContext db, ILoggerFactory loggerFactory)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            loggerFactory.AddSerilog();
            app.UseGraphiQl();
            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "GraphQL API V1");
            });
            app.UseMvc();
            db.EnsureSeedData();
            //Log.CloseAndFlush();
        }
Пример #2
0
 public DeviceRepository(TelemetryDataContext db)
 {
     _db = db;
 }