Exemple #1
0
        public EntityFrameworkUnitOfWork(MegaProjectContext context)//, IRepositoryProvider repositoryProvider)
        {
            Context = context;

            //repositoryProvider.Context = Context;
            //RepositoryProvider = repositoryProvider;
        }
        //, IRepositoryProvider repositoryProvider)
        public EntityFrameworkUnitOfWork(MegaProjectContext context)
        {
            Context = context;

            //repositoryProvider.Context = Context;
            //RepositoryProvider = repositoryProvider;
        }
Exemple #3
0
        public Repository(IEFUnitOfWork unitOfWork)
        {
            if (unitOfWork == null)
            {
                throw new ArgumentNullException("unitOfWork");
            }

            _context = unitOfWork.Context;
        }
Exemple #4
0
        public Repository(MegaProjectContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            _context = context;
        }
Exemple #5
0
 public Repository()
 {
     _context = new MegaProjectContext();
 }
Exemple #6
0
        //protected IRepositoryProvider RepositoryProvider { get; set; }

        public EntityFrameworkUnitOfWork()
        {
            Context = new MegaProjectContext();
        }
 public void DbSetup()
 {
     Database.SetInitializer(new SeedingDatabaseInitializer());
     using (var ctx = new MegaProjectContext())
     {
         ctx.Database.Initialize(true);
     }
 }
 //protected IRepositoryProvider RepositoryProvider { get; set; }
 public EntityFrameworkUnitOfWork()
 {
     Context = new MegaProjectContext();
 }