コード例 #1
0
ファイル: ApiDealController.cs プロジェクト: yogi120888/Ziny
        public HttpResponseMessage GetDealDeailsById(Int64 dealId)
        {
            ResponseWithData <GetDealModel> _response = new ResponseWithData <GetDealModel>();
            var _details = _dealRepository.GetDealDetailsById(dealId).FirstOrDefault();

            if (_details != null)
            {
                _response.Type    = "success";
                _response.Message = "success";
                _response.data    = _details;
                return(Request.CreateResponse(HttpStatusCode.OK, _response));
            }
            else
            {
                _response.Type    = "error";
                _response.Message = "No record found";
                _response.data    = null;
                return(Request.CreateResponse(HttpStatusCode.OK, _response));
            }
        }