// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, VotingSystemContext votingSystemContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "VotingSystem.WebApplication v1")); votingSystemContext.Database.EnsureCreated(); // generate database at first time load of application } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public CandidateRepository(VotingSystemContext votingSystemContext) : base(votingSystemContext) { this._votingSystemContext = votingSystemContext; }
public UnitOfWork(DbContext context) { _context = context; }
public Repository(VotingSystemContext dbContext) { _dbContext = dbContext; }
public VoterRepository(VotingSystemContext votingSystemContext) : base(votingSystemContext) { this._votingSystemContext = votingSystemContext; }