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

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

            request.SetProperties(
                response.Allocated);
            return(request);
        }
Esempio n. 3
0
        public virtual ApiKeyAllocationResponseModel MapRequestToResponse(
            string collectionName,
            ApiKeyAllocationRequestModel request)
        {
            var response = new ApiKeyAllocationResponseModel();

            response.SetProperties(collectionName,
                                   request.Allocated);
            return(response);
        }