public async Task <IHttpActionResult> Get(int id) { var segment = await _segmentService.GetSegment(id).ConfigureAwait(false); if (segment == null) { return(NotFound()); } var retVal = _mapping.Map <SegmentViewModel>(segment); return(Ok(retVal)); }
public async Task <ActionResult <List <SegmentResponse> > > GetSegment() { var rs = await _SegmentService.GetSegment(); return(Ok(rs)); }