/// <summary> /// GetNewsDetail /// </summary> /// <param name="request">GetNewsDetailRequest</param> /// <returns>GetNewsDetailResponse</returns> public async Task <GetNewsDetailResponse> GetNewsDetail(GetNewsDetailRequest request) { var response = new GetNewsDetailResponse(); try { var param = new GetNewsDetailParameter { id = request.ID }; var result = _dataAccess.GetNewsDetail(param); if (result != null) { response.NewsDetail = mapper.Map <GETNEWSDETAIL_Result, GetNewsDetailDto>(result); response.Success = true; } } catch (Exception ex) { response.Success = false; } return(await Task.FromResult(response)); }
public IHttpActionResult GetNewsDetail(GetNewsDetailRequest RequestData) { var result = _businessLogic.GetNewsDetail(RequestData); return(new ActionResult <GetNewsDetailResponse>(result.Result, Request)); }