예제 #1
0
        public ActionResult <List <BusModel> > GetAll()
        {
            var collection = _busService.GetAll();

            if (collection == null)
            {
                return(BadRequest("Buses not found"));
            }

            return(Ok(collection));
        }
예제 #2
0
 public ActionResult GetAll() => _busService.GetAll();
예제 #3
0
        public IHttpActionResult Get()
        {
            var buses = _busService.GetAll();

            return(Ok(buses));
        }