public JsonPatchDocument <ApiDeviceRequestModel> CreatePatch(ApiDeviceRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiDeviceRequestModel>();

            patch.Replace(x => x.Name, model.Name);
            patch.Replace(x => x.PublicId, model.PublicId);
            return(patch);
        }
        public virtual ApiDeviceRequestModel MapResponseToRequest(
            ApiDeviceResponseModel response)
        {
            var request = new ApiDeviceRequestModel();

            request.SetProperties(
                response.Name,
                response.PublicId);
            return(request);
        }
        public virtual ApiDeviceResponseModel MapRequestToResponse(
            int id,
            ApiDeviceRequestModel request)
        {
            var response = new ApiDeviceResponseModel();

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