public void TestSetUp()      
        {

            BloodDonorInitalizeDb db = new BloodDonorInitalizeDb();
            System.Data.Entity.Database.SetInitializer(db);
            repo = new BloodDonorRepository();
        }
Esempio n. 2
0
        public void TestSetUp()
        {
            BloodDonorInitalizeDb db = new BloodDonorInitalizeDb();

            System.Data.Entity.Database.SetInitializer(db);
            repo = new BloodDonorRepository();
        }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            UnityConfig.RegisterComponents();

            BloodDonorInitalizeDb db = new BloodDonorInitalizeDb();
            System.Data.Entity.Database.SetInitializer(db);
        }
Esempio n. 4
0
        public void TestSetUp()
        {
            BloodDonorInitalizeDb db = new BloodDonorInitalizeDb();

            Database.SetInitializer(db);
            BloodDonorContext con = new BloodDonorContext();

            con.Database.Initialize(true);
            con.Database.CreateIfNotExists();
            repo = new BloodDonorRepository();
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            BloodDonorInitalizeDb db = new BloodDonorInitalizeDb();

            Database.SetInitializer(db);
            BloodDonorContext con = new BloodDonorContext();

            con.Database.Initialize(true);
            con.Database.CreateIfNotExists();
            repo = new BloodDonorRepository();
            var a = repo.GetBloodDonors();
        }
Esempio n. 6
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            UnityConfig.RegisterComponents();

            BloodDonorInitalizeDb db = new BloodDonorInitalizeDb();

            System.Data.Entity.Database.SetInitializer(db);
        }