예제 #1
0
        public JsonPatchDocument <ApiProductDescriptionRequestModel> CreatePatch(ApiProductDescriptionRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiProductDescriptionRequestModel>();

            patch.Replace(x => x.Description, model.Description);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.Rowguid, model.Rowguid);
            return(patch);
        }
예제 #2
0
        public virtual ApiProductDescriptionRequestModel MapResponseToRequest(
            ApiProductDescriptionResponseModel response)
        {
            var request = new ApiProductDescriptionRequestModel();

            request.SetProperties(
                response.Description,
                response.ModifiedDate,
                response.Rowguid);
            return(request);
        }
예제 #3
0
        public virtual ApiProductDescriptionResponseModel MapRequestToResponse(
            int productDescriptionID,
            ApiProductDescriptionRequestModel request)
        {
            var response = new ApiProductDescriptionResponseModel();

            response.SetProperties(productDescriptionID,
                                   request.Description,
                                   request.ModifiedDate,
                                   request.Rowguid);
            return(response);
        }