// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ApollyContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseCors("MyPolicy"); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyAPI V1"); }); app.UseHttpsRedirection(); app.UseAuthentication(); app.UseMvc(); DBInitializer.Initialize(context); }
public AnswerController(ApollyContext context) { _context = context; }
public PollMembersController(ApollyContext context) { _context = context; }
public UserService(IOptions <AppSettings> appSettings, ApollyContext memberContext) { _appSettings = appSettings.Value; _memberContext = memberContext; }
public FriendsController(ApollyContext context) { _context = context; }
public VoteController(ApollyContext context) { _context = context; }
public PollController(ApollyContext context) { _context = context; }
public MemberController(ApollyContext context, IUserService userService) { _userService = userService; _context = context; }