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

            patch.Replace(x => x.Type, model.Type);
            return(patch);
        }
コード例 #2
0
        public virtual ApiLinkTypeRequestModel MapResponseToRequest(
            ApiLinkTypeResponseModel response)
        {
            var request = new ApiLinkTypeRequestModel();

            request.SetProperties(
                response.Type);
            return(request);
        }
コード例 #3
0
        public virtual ApiLinkTypeResponseModel MapRequestToResponse(
            int id,
            ApiLinkTypeRequestModel request)
        {
            var response = new ApiLinkTypeResponseModel();

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