示例#1
0
        public JsonPatchDocument <ApiProductCostHistoryRequestModel> CreatePatch(ApiProductCostHistoryRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiProductCostHistoryRequestModel>();

            patch.Replace(x => x.EndDate, model.EndDate);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.StandardCost, model.StandardCost);
            patch.Replace(x => x.StartDate, model.StartDate);
            return(patch);
        }
示例#2
0
        public virtual ApiProductCostHistoryRequestModel MapResponseToRequest(
            ApiProductCostHistoryResponseModel response)
        {
            var request = new ApiProductCostHistoryRequestModel();

            request.SetProperties(
                response.EndDate,
                response.ModifiedDate,
                response.StandardCost,
                response.StartDate);
            return(request);
        }