Exemplo n.º 1
0
 public async Task<IHttpActionResult> GetOther(int id)
 {
     var otherDto = await _otherService.GetSingleAsync(id);
     if (otherDto == null)
     {
         return NotFound();
     }
     var response = new OtherCompleteDto() { Others = new List<OtherDto>() };
     response.Others.Add(otherDto);
     return Ok(response);
 }
Exemplo n.º 2
0
 public async Task<OtherCompleteDto> GetOthers(string custom = "false")
 {
     var other = await _otherService.GetAllAsync(custom);
     var result = new OtherCompleteDto {Others = other.ToList()};
     return result;
 }