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

            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Exemplo n.º 2
0
        public virtual ApiVoteTypesRequestModel MapResponseToRequest(
            ApiVoteTypesResponseModel response)
        {
            var request = new ApiVoteTypesRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
Exemplo n.º 3
0
        public virtual ApiVoteTypesResponseModel MapRequestToResponse(
            int id,
            ApiVoteTypesRequestModel request)
        {
            var response = new ApiVoteTypesResponseModel();

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