private DbSet <T> _dbSet; //tablo public Repository(EduOrgContext context) { if (context != null) { _eduorgContext = context; _dbSet = _eduorgContext.Set <T>(); } }
protected void Application_Start() { using (EduOrgContext ent = new EduOrgContext()) { ent.Database.CreateIfNotExists(); } AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }