public static void Setup()
        {
            var connectionString = ConfigurationManager.ConnectionStrings["DDDCinema"].ConnectionString;

            using (var movieContext = new CinemaContext(connectionString))
                using (var promotionsContext = new PromotionsContext(connectionString))
                    using (var infrastructureContext = new InfrastructureContext(connectionString))
                    {
                        Database.SetInitializer(new MoviesDbInitializer());
                        movieContext.Database.Initialize(true);

                        Database.SetInitializer(new DropCreateDatabaseIfModelChanges <PromotionsContext>());
                        promotionsContext.Database.Initialize(true);

                        Database.SetInitializer(new DropCreateDatabaseIfModelChanges <InfrastructureContext>());
                        infrastructureContext.Database.Initialize(true);
                    }
        }
 public EfApprovalRepository(PromotionsContext context)
 {
     _context = context;
 }
 public EfPromotionRepository(PromotionsContext context)
 {
     _context = context;
 }
Exemple #4
0
 public PromotionTransactionalCommandHandler(ICommandHandler <T> handler, PromotionsContext context) : base(handler, context)
 {
 }
 public EfApprovalRepository(PromotionsContext context)
 {
     _context = context;
 }
 public EfPromotionRepository(PromotionsContext context)
 {
     _context = context;
 }