public async Task GetBusStops() { if (this.BusStops != null) { return; } string query = $"SELECT * FROM BusStop WHERE IdOfTrack = {this.Id} AND IdOfSchedule = {this.IdOfSchedule};"; await Task.Run(() => this.BusStops = SQLServices.QueryTimetable <BusStop>(query)); }
public async Task <List <Letter> > GetLetters() { string query = $"SELECT * FROM Letter WHERE IdOfBusStop = {this.Id};"; List <Letter> letters = await Task.Run(() => SQLServices.QueryTimetable <Letter>(query) .GroupBy(p => p.IdOfName) .Select(p => p.First()) .ToList()); return(letters); }
public async Task GetTracks() { if (this.Tracks != null) { return; } string query = $"SELECT * FROM Track WHERE IdOfSchedule = {this.Id};"; await Task.Run(() => this.Tracks = SQLServices.QueryTimetable <Track>(query)); }
public async Task GetHours() { if (Hours != null) { return; } string query = $"SELECT * FROM Hour WHERE IdOfBusStop = {this.Id};"; await Task.Run(() => this.Hours = SQLServices.QueryTimetable <Hour>(query)); }