public async Task <OtherCompleteDto> GetOthers(string custom = "false") { var other = await _otherService.GetAllAsync(custom); var result = new OtherCompleteDto { Others = other.ToList() }; return(result); }
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)); }