Commit d199d4fff06e5c0e9ab1ae3ec01e57da27cca830
1 parent
afdb105c
change details to Edit
Showing
4 changed files
with
19 additions
and
12 deletions
Show diff stats
src/Maps/Controllers/BusStopController.cs
src/MapsDb/DataService/BusStopDs.cs
... | ... | @@ -13,19 +13,26 @@ namespace MapsDb.DataService |
13 | 13 | public BusStopDs(){ |
14 | 14 | _context = new PostgresDbContext(); |
15 | 15 | } |
16 | - public Task<IList<BusStopListDsM>> GetIndexListAsync(){ | |
16 | + public Task<IList<BusStopEditDsM>> GetIndexListAsync(){ | |
17 | 17 | return Task.Factory.StartNew(GetAllBusStop); |
18 | 18 | } |
19 | - private IList<BusStopListDsM> GetAllBusStop() | |
19 | + private IList<BusStopEditDsM> GetAllBusStop() | |
20 | 20 | { |
21 | - return _context.BusStop.Select(x => new BusStopListDsM | |
21 | + return _context.BusStop.Select(busStop => new BusStopEditDsM | |
22 | 22 | { |
23 | - Road = x.Road.Name, | |
24 | - Region = x.Region.Name, | |
25 | - Settlement = x.Settlement.Name, | |
26 | - LocationLeft = x.LocationLeft, | |
27 | - LocationRight = x.LocationRight, | |
28 | - StateCommon = x.StateCommon.Value | |
23 | + RoadId = busStop.RoadId, | |
24 | + RegionId = busStop.RegionId, | |
25 | + SettlementId = busStop.SettlementId, | |
26 | + LocationLeft = busStop.LocationLeft, | |
27 | + LocationRight = busStop.LocationRight, | |
28 | + SurfaceTypeId = busStop.SurfaceTypeId, | |
29 | + AreaStopAvailability = busStop.AreaStopAvailability, | |
30 | + AreaLandAvailability = busStop.AreaLandAvailability, | |
31 | + PocketAvailability = busStop.PocketAvailability, | |
32 | + ToiletAvailability = busStop.ToiletAvailability, | |
33 | + YearBuild = busStop.YearBuild, | |
34 | + YearRepair = busStop.YearRepair, | |
35 | + StateCommonId = busStop.StateCommonId | |
29 | 36 | }).ToList(); |
30 | 37 | } |
31 | 38 | ... | ... |
src/MapsDb/Interfaces/IBusStopDs.cs
... | ... | @@ -6,7 +6,7 @@ namespace MapsDb.Interfaces |
6 | 6 | { |
7 | 7 | public interface IBusStopDs |
8 | 8 | { |
9 | - Task<IList<BusStopListDsM>> GetIndexListAsync(); | |
9 | + Task<IList<BusStopEditDsM>> GetIndexListAsync(); | |
10 | 10 | Task SaveAsync(BusStopEditDsM busStop, int? id = null); |
11 | 11 | Task<BusStopDetailsDsM> FindOneDetailsAsync(int Id); |
12 | 12 | Task<int> DeleteAsync(int? Id); | ... | ... |
src/MapsModels/ViewModels/ListBusStopVm.cs