예제 #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, CW03Context dataContext)
        {
            if (env.IsDevelopment())
            {
                // migrate any database changes on startup (includes initial db creation)
                dataContext.Database.Migrate();
                app.UseDeveloperExceptionPage();
                app.UseMigrationsEndPoint();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
                app.UseHsts();
            }

            app.UseRouting();

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseCookiePolicy();

            app.UseEndpoints(endpoints => {
                endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
            });
        }
예제 #2
0
 public HomeController(CW03Context context,
                       IFolderRepo folderRepo,
                       IBookmarkEntityRepo bookmarkEntityRepo)
 {
     db = context;
     this.folderRepo         = folderRepo;
     this.bookmarkEntityRepo = bookmarkEntityRepo;
 }
예제 #3
0
 public GoogleApiController(CW03Context context,
                            IBookmarkEntityRepo bookmarkEntityRepo,
                            IFolderRepo folderRepo,
                            IItemLinkRepo itemLinkRepo,
                            IItemLocationRepo itemLocationRepo,
                            IItemTextfileRepo itemTextfileRepo)
 {
     _context = context;
     this.bookmarkEntityRepo = bookmarkEntityRepo;
     this.folderRepo         = folderRepo;
     this.itemLinkRepo       = itemLinkRepo;
     this.itemLocationRepo   = itemLocationRepo;
     this.itemTextfileRepo   = itemTextfileRepo;
 }
 public BookmarkEntityRepo(CW03Context context)
 {
     db = context;
 }
예제 #5
0
 public FolderRepo(CW03Context context)
 {
     db = context;
 }
 public ItemLocationRepo(CW03Context context)
 {
     db = context;
 }
예제 #7
0
 public ItemLinkRepo(CW03Context context)
 {
     db = context;
 }
예제 #8
0
 public ItemTextfileRepo(CW03Context context)
 {
     db = context;
 }