private CheckpointOrder GetCheckpointOrder(int id) { Entities ent = new Entities(); var coQuery = from c in ent.CheckpointOrders where c.CheckpointID == id select c; CheckpointOrder co = coQuery.FirstOrDefault(); return co; }