コード例 #1
0
        // Hung Ly
        //private DbSet<T> entities;

        #region Properties

        public RepositoryBase(AppsDbContext context)
        {
            _context = context;
            //if (_context == null)
            //{
            //    throw new ArgumentNullException("Context");
            //}
            // Hung Ly
            //entities = context.Set<T>();
        }
コード例 #2
0
 public PostRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #3
0
 public DbFactory(AppsDbContext context)
 {
     _context = context;
 }
コード例 #4
0
ファイル: RepositoryBase.cs プロジェクト: mrlee24/OSM
 public RepositoryBase(IDbFactory dbFactory)
 {
     _context = dbFactory.GetDataContext;
 }
コード例 #5
0
 public OrderRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #6
0
 public FooterRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #7
0
 public ContactDetailRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #8
0
 public SlideRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #9
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, AppsDbContext context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseDatabaseErrorPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();

            app.UseIdentity();

            // Add external authentication middleware below. To configure them please see https://go.microsoft.com/fwlink/?LinkID=532715

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });

            SeedData.Initialize(context);
        }
コード例 #10
0
 public MenuRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #11
0
 public SupportOnlineRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #12
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, AppsDbContext context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseCors(
                builder => builder.AllowAnyOrigin()
                .AllowAnyHeader()
                .AllowAnyMethod()
                .AllowCredentials())
            .UseStaticFiles();

            app.UseMvc(routes =>
            {
                routes.MapRoute("areaRoute", "{area:exists}/{controller=Admin}/{action=Index}/{id?}");

                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
            SeedData.Initialize(context);
        }
コード例 #13
0
 public UnitOfWork(AppsDbContext dbContext)
 {
     _dbContext = dbContext;
 }
コード例 #14
0
 public SystemConfigRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #15
0
 public ProductRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #16
0
 public ErrorRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #17
0
 public VisitorStatisticRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #18
0
 public TagRepository(AppsDbContext context) : base(context)
 {
 }
コード例 #19
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, AppsDbContext context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();

                // dbContext.Database.Migrate(); //this will generate the db if it does not exist
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Admin}/{action=Index}/{id?}");
            });

            // Seefing base data into database
            SeedData.Initialize(context);
        }
コード例 #20
0
 public FeedbackRepository(AppsDbContext context) : base(context)
 {
 }