// 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>(); }
public PostRepository(AppsDbContext context) : base(context) { }
public DbFactory(AppsDbContext context) { _context = context; }
public RepositoryBase(IDbFactory dbFactory) { _context = dbFactory.GetDataContext; }
public OrderRepository(AppsDbContext context) : base(context) { }
public FooterRepository(AppsDbContext context) : base(context) { }
public ContactDetailRepository(AppsDbContext context) : base(context) { }
public SlideRepository(AppsDbContext context) : base(context) { }
// 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) { }
public SupportOnlineRepository(AppsDbContext context) : base(context) { }
// 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); }
public UnitOfWork(AppsDbContext dbContext) { _dbContext = dbContext; }
public SystemConfigRepository(AppsDbContext context) : base(context) { }
public ProductRepository(AppsDbContext context) : base(context) { }
public ErrorRepository(AppsDbContext context) : base(context) { }
public VisitorStatisticRepository(AppsDbContext context) : base(context) { }
public TagRepository(AppsDbContext context) : base(context) { }
// 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); }
public FeedbackRepository(AppsDbContext context) : base(context) { }