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

            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Exemple #2
0
        public virtual ApiLinkStatusRequestModel MapResponseToRequest(
            ApiLinkStatusResponseModel response)
        {
            var request = new ApiLinkStatusRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
Exemple #3
0
        public virtual ApiLinkStatusResponseModel MapRequestToResponse(
            int id,
            ApiLinkStatusRequestModel request)
        {
            var response = new ApiLinkStatusResponseModel();

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