Beispiel #1
0
        public UserController(IOptionsSnapshot <AppSettings> settings, UmsContext umsContext, IMapper mapper, ICapPublisher capPublisher)
        {
            _settings     = settings;
            _umsContext   = umsContext;
            _mapper       = mapper;
            _capPublisher = capPublisher;

            _umsContext.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
        }
Beispiel #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, UmsContext umsContext)
        {
            app.UseRouting();

            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "ums api v1");
                c.RoutePrefix = string.Empty;
            });

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