コード例 #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, WebpollContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseCors("MyPolicy");
            app.UseSwagger();
            app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Gebruiker API v1"); });
            app.UseHttpsRedirection();
            app.UseAuthentication();
            app.UseMvc();
            DBInitializer.Initialize(context);
        }
コード例 #2
0
 public PollUserController(WebpollContext context)
 {
     _context = context;
 }
コード例 #3
0
 public AntwoordController(WebpollContext context)
 {
     _context = context;
 }
コード例 #4
0
 public StemController(WebpollContext context)
 {
     _context = context;
 }
コード例 #5
0
 public UserController(IUserService userService, WebpollContext context)
 {
     _userService = userService;
     _context     = context;
 }
コード例 #6
0
 public VriendController(WebpollContext context)
 {
     _context = context;
 }
コード例 #7
0
 public UserService(IOptions <AppSettings> appSettings, WebpollContext webpollContext)
 {
     _appSettings    = appSettings.Value;
     _webpollContext = webpollContext;
 }