Exemplo n.º 1
0
        public JsonPatchDocument <ApiIllustrationRequestModel> CreatePatch(ApiIllustrationRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiIllustrationRequestModel>();

            patch.Replace(x => x.Diagram, model.Diagram);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            return(patch);
        }
Exemplo n.º 2
0
        public virtual ApiIllustrationRequestModel MapResponseToRequest(
            ApiIllustrationResponseModel response)
        {
            var request = new ApiIllustrationRequestModel();

            request.SetProperties(
                response.Diagram,
                response.ModifiedDate);
            return(request);
        }
Exemplo n.º 3
0
        public virtual ApiIllustrationResponseModel MapRequestToResponse(
            int illustrationID,
            ApiIllustrationRequestModel request)
        {
            var response = new ApiIllustrationResponseModel();

            response.SetProperties(illustrationID,
                                   request.Diagram,
                                   request.ModifiedDate);
            return(response);
        }