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

            patch.Replace(x => x.Type, model.Type);
            return(patch);
        }
Ejemplo n.º 2
0
        public virtual ApiPostTypesRequestModel MapResponseToRequest(
            ApiPostTypesResponseModel response)
        {
            var request = new ApiPostTypesRequestModel();

            request.SetProperties(
                response.Type);
            return(request);
        }
Ejemplo n.º 3
0
        public virtual ApiPostTypesResponseModel MapRequestToResponse(
            int id,
            ApiPostTypesRequestModel request)
        {
            var response = new ApiPostTypesResponseModel();

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