Example #1
0
        /// <summary>
        /// 站点更新
        /// </summary>
        /// <param name="stationUpdateViewModel"></param>
        /// <returns></returns>
        public int Station_Update(StationUpdateViewModel stationUpdateViewModel)
        {
            var Station_Info        = _IBusStationRepository.GetInfoByStationId(stationUpdateViewModel.Id);
            var Station_Info_Update = _IMapper.Map <StationUpdateViewModel, Bus_Station>(stationUpdateViewModel, Station_Info);

            _IBusStationRepository.Update(Station_Info_Update);
            return(_IBusStationRepository.SaveChanges());
        }
        public async Task UpdateAsync(BusStationEntity busStation)
        {
            Guard.ArgumentNotNull(busStation, nameof(busStation));

            var busRoutes = await _repository.GetById(busStation.Id).ConfigureAwait(false);

            if (busRoutes != null)
            {
                await _repository.Update(busStation).ConfigureAwait(false);
            }
        }