示例#1
0
 public ApiRepository()
 {
     _sectors = ObjectCreator.GenerateListWithFunction(_trackSectorContext.GetAllSectors(),
                                                       _objectCreator.CreateSector);
     _tracks = ObjectCreator.GenerateListWithFunction(_trackSectorContext.GetAllTracks(),
                                                      ObjectCreator.CreateTrack);
     _trams = ObjectCreator.GenerateListWithFunction(_tramContext.GetAllTrams(),
                                                     _objectCreator.CreateTram).ToDictionary(x => x.Number, x => x);
 }
示例#2
0
 /// <summary>
 ///     Haal alle trams op.
 /// </summary>
 public List <Tram> GetAllTrams()
 {
     return(ObjectCreator.GenerateListWithFunction(_tramContext.GetAllTrams(), _objectCreator.CreateTram));
 }
示例#3
0
 public List <Tram> GetAllTrams()
 {
     return(tramContext.GetAllTrams());
 }