예제 #1
0
        public JsonResult Remove(string title)
        {
            var route = _tripRouteRepository.GetByTitle(title);

            if (route == null)
            {
                return(Json(false));
            }

            _tripRouteRepository.Remove(route);

            return(Json(true));
        }
예제 #2
0
        public JsonResult Remove(long id)
        {
            var route = _tripRouteRepository.GetById(id);

            if (route == null)
            {
                return(Json(false));
            }

            _busRepository.UpdateBusRoute(route);
            _tripRouteRepository.Remove(route);

            return(Json(true));
        }