Ejemplo n.º 1
0
 public async Task<IHttpActionResult> GetOrigin(int id)
 {
     var originDto = await _originService.GetSingleAsync(id);
     if (originDto == null)
     {
         return NotFound();
     }
     var originsComplete = new OriginCompleteDto { Origins = new List<OriginDto>() };
     originsComplete.Origins.Add(originDto);
     return  Ok(originsComplete);
 }
Ejemplo n.º 2
0
 public async Task<OriginCompleteDto> GetOrigins(int from = 0,int size = 20,string custom = "false")
 {
     var originDto = await _originService.GetAllAsync(from, size, custom);
     var originsComplete = new OriginCompleteDto { Origins = originDto.ToList()};
     return originsComplete;
 }