Beispiel #1
0
        public JsonPatchDocument <ApiPostTypeRequestModel> CreatePatch(ApiPostTypeRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiPostTypeRequestModel>();

            patch.Replace(x => x.Type, model.Type);
            return(patch);
        }
Beispiel #2
0
        public virtual ApiPostTypeRequestModel MapResponseToRequest(
            ApiPostTypeResponseModel response)
        {
            var request = new ApiPostTypeRequestModel();

            request.SetProperties(
                response.Type);
            return(request);
        }
Beispiel #3
0
        public virtual ApiPostTypeResponseModel MapRequestToResponse(
            int id,
            ApiPostTypeRequestModel request)
        {
            var response = new ApiPostTypeResponseModel();

            response.SetProperties(id,
                                   request.Type);
            return(response);
        }