Commit 6dc445867a24afe5cd86c9c5f5ac2e1cc91b19ea

Authored by Administrator
1 parent 405bb8be

add filter

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
src/MapsDb/DataService/BusStopDs.cs
@@ -19,7 +19,8 @@ namespace MapsDb.DataService @@ -19,7 +19,8 @@ namespace MapsDb.DataService
19 } 19 }
20 private IList<BusStopEditDsM> GetAllBusStop(PaginationDsM pagination) 20 private IList<BusStopEditDsM> GetAllBusStop(PaginationDsM pagination)
21 { 21 {
22 - var data = _context.BusStop.Select(BusStop => new BusStopEditDsM 22 + var filter = "Крым";
  23 + var data = _context.BusStop.Where(x => x.Region.Name == filter ).Select(BusStop => new BusStopEditDsM
23 { 24 {
24 Id = BusStop.Id, 25 Id = BusStop.Id,
25 RoadId = BusStop.RoadId, 26 RoadId = BusStop.RoadId,
@@ -36,6 +37,7 @@ namespace MapsDb.DataService @@ -36,6 +37,7 @@ namespace MapsDb.DataService
36 YearRepair = BusStop.YearRepair, 37 YearRepair = BusStop.YearRepair,
37 StateCommonId = BusStop.StateCommonId 38 StateCommonId = BusStop.StateCommonId
38 }).Skip(pagination.from).Take(pagination.perPage); 39 }).Skip(pagination.from).Take(pagination.perPage);
  40 +
39 switch (pagination.orderType()) 41 switch (pagination.orderType())
40 { 42 {
41 case "ASC": 43 case "ASC":