From 6dc445867a24afe5cd86c9c5f5ac2e1cc91b19ea Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 14 Feb 2017 19:51:29 +0200 Subject: [PATCH] add filter --- src/MapsDb/DataService/BusStopDs.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MapsDb/DataService/BusStopDs.cs b/src/MapsDb/DataService/BusStopDs.cs index dd1ca30..311864b 100644 --- a/src/MapsDb/DataService/BusStopDs.cs +++ b/src/MapsDb/DataService/BusStopDs.cs @@ -19,7 +19,8 @@ namespace MapsDb.DataService } private IList GetAllBusStop(PaginationDsM pagination) { - var data = _context.BusStop.Select(BusStop => new BusStopEditDsM + var filter = "Крым"; + var data = _context.BusStop.Where(x => x.Region.Name == filter ).Select(BusStop => new BusStopEditDsM { Id = BusStop.Id, RoadId = BusStop.RoadId, @@ -36,6 +37,7 @@ namespace MapsDb.DataService YearRepair = BusStop.YearRepair, StateCommonId = BusStop.StateCommonId }).Skip(pagination.from).Take(pagination.perPage); + switch (pagination.orderType()) { case "ASC": -- libgit2 0.21.4