Пример #1
0
        public JsonPatchDocument <ApiSchemaAPersonRequestModel> CreatePatch(ApiSchemaAPersonRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiSchemaAPersonRequestModel>();

            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Пример #2
0
        public virtual ApiSchemaAPersonRequestModel MapResponseToRequest(
            ApiSchemaAPersonResponseModel response)
        {
            var request = new ApiSchemaAPersonRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
Пример #3
0
        public virtual ApiSchemaAPersonResponseModel MapRequestToResponse(
            int id,
            ApiSchemaAPersonRequestModel request)
        {
            var response = new ApiSchemaAPersonResponseModel();

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