public object Clone() { var route = new RouteModel() { Id = Id, Mark = Mark, Name = Name }; route.RailwayStations = new ObservableCollection <RailwayStationModel>(RailwayStations); return(route); }
public async Task ExecuteAsync() { _oldRoute = await _routeService.GetRouteAsync(_newRoute.Id); await _routeService.UpdateRouteAsync(_newRoute); }
public AddRouteCommand(IRouteService routeService, RouteModel routeModel) { _routeService = routeService; _routeModel = routeModel.Clone() as RouteModel; }
public EditRouteCommand(IRouteService routeService, RouteModel newRoute) { _routeService = routeService; _newRoute = newRoute.Clone() as RouteModel; }
public RemoveRouteCommand(IRouteService routeService, RouteModel route) { _routeService = routeService; _route = route; }