Beispiel #1
0
 protected override void SetupModules(TestEfDependencyResolver resolver)
 {
     resolver.Modules.Add(new EntityAuditModule());
     using (var context = new TestDbContext()) {
         var family = context.Families.Add(new Family {
             Name = "Test",
             Date = DateTime.Now
         });
         context.SaveChanges();
         this.familyId = family.ID;
     }
 }
Beispiel #2
0
        public void OnStartUp()
        {
            EntityFrameworkProfiler.Initialize();

            var resolver = new TestEfDependencyResolver {
                Modules = new List <IDbContextModule> {
                    new EntityAuditModule()
                }
            };

            EfConfiguration.RegisterDependencyResolver <TestDbContext>(resolver);
            Database.SetInitializer(new DropCreateDatabaseAlways <TestDbContext>());
            resolver.Modules.Clear();
        }
 protected virtual void SetupModules(TestEfDependencyResolver resolver)
 {
 }
Beispiel #4
0
 protected override void SetupModules(TestEfDependencyResolver resolver)
 {
     resolver.Modules.Add(new EntityTimestampModule());
 }