// 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>();
        }
Example #2
0
 public PostRepository(AppsDbContext context) : base(context)
 {
 }
Example #3
0
 public DbFactory(AppsDbContext context)
 {
     _context = context;
 }
Example #4
0
 public RepositoryBase(IDbFactory dbFactory)
 {
     _context = dbFactory.GetDataContext;
 }
 public OrderRepository(AppsDbContext context) : base(context)
 {
 }
Example #6
0
 public FooterRepository(AppsDbContext context) : base(context)
 {
 }
Example #7
0
 public ContactDetailRepository(AppsDbContext context) : base(context)
 {
 }
 public SlideRepository(AppsDbContext context) : base(context)
 {
 }
Example #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);
        }
 public MenuRepository(AppsDbContext context) : base(context)
 {
 }
Example #11
0
 public SupportOnlineRepository(AppsDbContext context) : base(context)
 {
 }
Example #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);
        }
Example #13
0
 public UnitOfWork(AppsDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Example #14
0
 public SystemConfigRepository(AppsDbContext context) : base(context)
 {
 }
Example #15
0
 public ProductRepository(AppsDbContext context) : base(context)
 {
 }
Example #16
0
 public ErrorRepository(AppsDbContext context) : base(context)
 {
 }
Example #17
0
 public VisitorStatisticRepository(AppsDbContext context) : base(context)
 {
 }
Example #18
0
 public TagRepository(AppsDbContext context) : base(context)
 {
 }
Example #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);
        }
Example #20
0
 public FeedbackRepository(AppsDbContext context) : base(context)
 {
 }