Пример #1
0
 public UnitOfWork(PPModel context)
 {
     this.context = context;
     context.Configuration.ProxyCreationEnabled = false;
     context.Configuration.LazyLoadingEnabled   = false;
     context.Database.CommandTimeout            = 300;
 }
Пример #2
0
        private static PPModel CreateModel()
        {
            var model = new PPModel();

            model.Configuration.ProxyCreationEnabled = false;
            model.Configuration.LazyLoadingEnabled   = false;
            model.Database.CommandTimeout            = 300;
            return(model);
        }
Пример #3
0
 public UnitOfWork()
 {
     context = CreateModel();
 }