예제 #1
0
        public HttpResponseMessage Test(string arr)
        {
            var sw = Stopwatch.StartNew();

            using (var u = new passioTestEntities())
            {
                var v = u.Promotions.ToList();
                return(Http.OkBase(null, sw.ElapsedMilliseconds));
            }
        }
 public UnitOfWork(ITContainer scope)
 {
     Scope        = scope;
     Context      = new passioTestEntities();
     ResourcePool = new Dictionary <Type, object>();
 }
 public UnitOfWork()
 {
     //Scope = G.TContainer.RequestScope;
     Context      = new passioTestEntities();
     ResourcePool = new Dictionary <Type, object>();
 }
 public void ReInit(params object[] initParams)
 {
     //params order: 0/ uow
     context = ((IUnitOfWork)initParams[0]).Context;
 }
 public BaseRepository(IUnitOfWork uow)
 {
     this.context = uow.Context;
 }