コード例 #1
0
        private DbSet <T> _dbSet;           //tablo

        public Repository(BiletContext context)
        {
            if (context != null)
            {
                _biletContext = context;
                _dbSet        = _biletContext.Set <T>();
            }
        }
コード例 #2
0
        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);
        }