예제 #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, HumanResourcesContext db)
        {
            //if (env.IsDevelopment())
            //{
            //  app.UseDeveloperExceptionPage();
            //}
            //else
            //{
            //  app.UseExceptionHandler("/Error");
            //}

            // FE: To send back consistent error message object even with stack trace
            // Test endpoint: }/api/Buggy/servererror
            app.UseMiddleware <ExceptionMiddleware>();

            app.UseStatusCodePagesWithReExecute("/errors/{0}");

            db.Database.EnsureCreated();

            app.UseStaticFiles();
            if (!env.IsDevelopment())
            {
                app.UseSpaStaticFiles();
            }

            app.UseRouting();

            // FE
            app.UseCors("CorsPolicy");

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller}/{action=Index}/{id?}");
            });

            app.UseSpa(spa =>
            {
                // To learn more about options for serving an Angular SPA from ASP.NET Core,
                // see https://go.microsoft.com/fwlink/?linkid=864501

                spa.Options.SourcePath = "ClientApp";

                if (env.IsDevelopment())
                {
                    spa.UseAngularCliServer(npmScript: "start");
                }
            });
        }
 public EmployeeRepository(HumanResourcesContext context) : base(context)
 {
 }
예제 #3
0
 public JobsController(HumanResourcesContext context)
 {
     this.context = context;
 }
예제 #4
0
 protected Repository(HumanResourcesContext humanResourcesContext)
 {
     _context = humanResourcesContext;
     _dbSet   = _context.Set <T>();
 }
예제 #5
0
 public EmployeesRepository(HumanResourcesContext _db)
 {
     db = _db;
 }
예제 #6
0
 public BuggyController(HumanResourcesContext context)
 {
     _context = context;
 }
예제 #7
0
 public DepartmentsRepository(HumanResourcesContext _db)
 {
     db = _db;
 }
예제 #8
0
 public BaseRepository(HumanResourcesContext context)
 {
     _context = context;
 }
 public SkillRepository(HumanResourcesContext context) : base(context)
 {
 }
예제 #10
0
 public EmployeeRepository(HumanResourcesContext context)
 {
     _context = context;
 }
예제 #11
0
 public UserRepository(HumanResourcesContext context) : base(context)
 {
     _context = context;
 }
 public EmployeesController(HumanResourcesContext context)
 {
     _context = context;
 }
 public HumanResourcesController(HumanResourcesContext context, IHostingEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }
예제 #14
0
 public JobsRepository(HumanResourcesContext _db)
 {
     db = _db;
 }
예제 #15
0
 public GenderRepository(HumanResourcesContext context) : base(context)
 {
 }