示例#1
0
        public IActionResult Get()
        {
            IEnumerable <DepartureDto> departureDtos;

            try
            {
                departureDtos = departureService.GetAll();
            }
            catch (Exception ex)
            {
                return(BadRequest(new { ErrorType = ex.GetType().Name, ex.Message }));
            }

            return(Ok(departureDtos));
        }
示例#2
0
 public async Task <IActionResult> GetAll()
 {
     return(Json(await _service.GetAll()));
 }
示例#3
0
        public IActionResult Get()
        {
            var entites = _departureService.GetAll();

            return(Json(entites));
        }
示例#4
0
 public IActionResult Get()
 {
     return(Ok(service.GetAll()));
 }
示例#5
0
        public async Task <ActionResult> Get()
        {
            var results = await _departureService.GetAll();

            return(Ok(results));
        }
 public async Task <IActionResult> Get()
 {
     return(Ok(await service.GetAll()));
 }