コード例 #1
0
ファイル: AssetController.cs プロジェクト: dwiarynti/Aston
        public HttpResponseMessage UpdateAsset(HttpRequestMessage request, [FromBody] Asset obj)
        {
            var result = service.UpdateAsset(obj);
            HttpResponseMessage response = new HttpResponseMessage();

            response = request.CreateResponse(HttpStatusCode.OK, new { success = result });
            return(response);
        }
コード例 #2
0
        public HttpResponseMessage UpdateAsset(HttpRequestMessage request, [FromBody] AssetViewModel obj)
        {
            obj.UpdatedDate = _dateExtension.GetDateTime();

            var result = service.UpdateAsset(obj);
            HttpResponseMessage response = new HttpResponseMessage();

            response = request.CreateResponse(HttpStatusCode.OK, new { success = result });
            return(response);
        }