Пример #1
0
 public JwtService(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     TrainSystemContext context,
     IConfiguration configuration)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _context       = context;
     _configuration = configuration;
 }
Пример #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, TrainSystemContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseCors(builder => builder.WithOrigins("*").AllowAnyHeader().AllowAnyMethod());

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

            context.Database.Migrate();
        }
Пример #3
0
 public StopToRouteService(TrainSystemContext context)
 {
     _context = context;
 }
Пример #4
0
 public UserService(TrainSystemContext context)
 {
     _context = context;
 }
Пример #5
0
 public DiscountService(TrainSystemContext context)
 {
     _context = context;
 }
Пример #6
0
 public RideService(TrainSystemContext context)
 {
     _context = context;
 }
Пример #7
0
 public TrainStopService(TrainSystemContext context)
 {
     _context = context;
 }