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

            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.Primary, model.Primary);
            patch.Replace(x => x.ProductPhotoID, model.ProductPhotoID);
            return(patch);
        }
コード例 #2
0
        public virtual ApiProductProductPhotoRequestModel MapResponseToRequest(
            ApiProductProductPhotoResponseModel response)
        {
            var request = new ApiProductProductPhotoRequestModel();

            request.SetProperties(
                response.ModifiedDate,
                response.Primary,
                response.ProductPhotoID);
            return(request);
        }
コード例 #3
0
        public virtual ApiProductProductPhotoResponseModel MapRequestToResponse(
            int productID,
            ApiProductProductPhotoRequestModel request)
        {
            var response = new ApiProductProductPhotoResponseModel();

            response.SetProperties(productID,
                                   request.ModifiedDate,
                                   request.Primary,
                                   request.ProductPhotoID);
            return(response);
        }