//public static List<DTOArrivingChild> GetChildren(int groupId) //{ // using (ModelEntities db = new ModelEntities()) // { // return db.StudentInBus.Where(s => s.Student.groupId == groupId&&s.didCome==true).ToList().ConvertAll(s => ToDTO.DTOArrivingChild(s)); // } //} public static List <DTOPath> GetPath(int busId) { using (ModelEntities db = new ModelEntities()) { return(db.StudentInBus.Where(s => s.busId == busId).ToList().ConvertAll(s => ToDTO.DTOPath(s))); } }
public static List <DTOBus> GetaccompanierBus(int accompanierId) { using (ModelEntities db = new ModelEntities()) { return(db.Buses.Where(b => b.accompanierId == accompanierId).ToList().ConvertAll(b => ToDTO.DTOBus(b))); } }