Esempio n. 1
0
        public JsonPatchDocument <ApiCompositePrimaryKeyRequestModel> CreatePatch(ApiCompositePrimaryKeyRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiCompositePrimaryKeyRequestModel>();

            patch.Replace(x => x.Id2, model.Id2);
            return(patch);
        }
Esempio n. 2
0
        public virtual ApiCompositePrimaryKeyRequestModel MapResponseToRequest(
            ApiCompositePrimaryKeyResponseModel response)
        {
            var request = new ApiCompositePrimaryKeyRequestModel();

            request.SetProperties(
                response.Id2);
            return(request);
        }
Esempio n. 3
0
        public virtual ApiCompositePrimaryKeyResponseModel MapRequestToResponse(
            int id,
            ApiCompositePrimaryKeyRequestModel request)
        {
            var response = new ApiCompositePrimaryKeyResponseModel();

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