コード例 #1
0
        public JsonPatchDocument <ApiProductModelRequestModel> CreatePatch(ApiProductModelRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiProductModelRequestModel>();

            patch.Replace(x => x.CatalogDescription, model.CatalogDescription);
            patch.Replace(x => x.Instruction, model.Instruction);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.Name, model.Name);
            patch.Replace(x => x.Rowguid, model.Rowguid);
            return(patch);
        }
コード例 #2
0
        public virtual ApiProductModelRequestModel MapResponseToRequest(
            ApiProductModelResponseModel response)
        {
            var request = new ApiProductModelRequestModel();

            request.SetProperties(
                response.CatalogDescription,
                response.Instruction,
                response.ModifiedDate,
                response.Name,
                response.Rowguid);
            return(request);
        }
コード例 #3
0
        public virtual ApiProductModelResponseModel MapRequestToResponse(
            int productModelID,
            ApiProductModelRequestModel request)
        {
            var response = new ApiProductModelResponseModel();

            response.SetProperties(productModelID,
                                   request.CatalogDescription,
                                   request.Instruction,
                                   request.ModifiedDate,
                                   request.Name,
                                   request.Rowguid);
            return(response);
        }