public DbContext GetDbContext()
        {
            string    key       = "EohiSHMDbContext";
            DbContext dbContext = CallContext.GetData(key) as DbContext; if (dbContext == null)

            {
                dbContext = new GDBContext <T>();

                CallContext.SetData(key, dbContext);
            }
            return(dbContext);
        }
Example #2
0
        public ActionResult <List <OBD> > QueryObd(QueryRequest Q)
        {
            GDBContext db = GDBContextManager.Find(Q.StartTime);

            return(db.QueryOBD(Q.TEID, Q.StartTime, Q.EndTime, Q.Top));
        }
Example #3
0
        public ActionResult <int> Add(GpsObdContainer model)
        {
            GDBContext db = GDBContextManager.Find(model.Gps.GetTime);

            return(db.AddR(model.Gps, model.Obd));
        }