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