// POST api/Select public HttpResponseMessage Post(WebApiParams param) { // B層呼出し+都度コミット LayerB layerB = new LayerB(); layerB.SelectByCondition(param); // 結果(正常系) List <Shipper> shipperData = new List <Shipper>(); shipperData = (List <Shipper>)param.Obj; if (shipperData.Count == 0) { // 結果表示するメッセージ string message = ""; Dictionary <string, string> dic = new Dictionary <string, string>(); // 結果(正常系) message = "No records found"; dic.Add("NoRecords", message); return(Request.CreateResponse(HttpStatusCode.OK, dic)); } else { return(Request.CreateResponse(HttpStatusCode.OK, shipperData)); } }