Exemple #1
0
        public async Task <LoadDTO> GetLoadById(int id)
        {
            var load = await _LoadService.GetLoadById(id);

            var resource = _mapper.Map <Load, LoadDTO>(load);

            return(resource);
        }
        public async Task <ActionResult <Load> > GetLoad([FromRoute] int id)
        {
            var load = await loadService.GetLoadById(id);

            if (load == null)
            {
                return(NoContent());
            }

            return(Ok(load));
        }
 public IActionResult Get(int id)
 {
     return(Ok(_service.GetLoadById(id)));
 }