public Departure GetFromId(int id) { ILineRepository lineRepository = new LineRepositoryStab(); var departure = new Departure(); departure.DepartureId = id; departure.DateTime = DateTime.Now.AddHours(id); departure.Line = lineRepository.Get(id); return(departure); }
public List <Departure> GetFromLineId(int lineId) { ILineRepository lineRepository = new LineRepositoryStab(); List <Departure> departures = new List <Departure>(); for (int i = 1; i <= 10; i++) { var departure = new Departure(); departure.DepartureId = i; departure.DateTime = DateTime.Now.AddHours(i); departure.Line = lineRepository.Get(lineId); } return(departures); }