public async Task <IEnumerable <string> > GetMrtLocations(MRTLineTypeEnum mrtLine)
        {
            var mrt1Locations = await _context.MrtFares.Where(m => m.Line == mrtLine)
                                .Select(s => s.FromLocation)
                                .Distinct()
                                .OrderBy(o => o)
                                .ToListAsync();

            return(mrt1Locations);
        }
Example #2
0
 public async Task <IEnumerable <string> > GetMrtLocations(MRTLineTypeEnum mrtLine)
 {
     return(await _service.GetMrtLocations(mrtLine));
 }
 public async Task <IEnumerable <MrtFare> > GetMrtFaresByLine(MRTLineTypeEnum mrtLine)
 {
     return(await _context.MrtFares.Where(p => p.Line == mrtLine).ToListAsync());
 }