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); }
public void TestSetUp() { BloodDonorInitalizeDb db = new BloodDonorInitalizeDb(); Database.SetInitializer(db); BloodDonorContext con = new BloodDonorContext(); con.Database.Initialize(true); con.Database.CreateIfNotExists(); repo = new BloodDonorRepository(); }
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(); }