コード例 #1
0
        public JsonPatchDocument <ApiTenantRequestModel> CreatePatch(ApiTenantRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiTenantRequestModel>();

            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
コード例 #2
0
        public virtual ApiTenantRequestModel MapResponseToRequest(
            ApiTenantResponseModel response)
        {
            var request = new ApiTenantRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
コード例 #3
0
        public virtual ApiTenantResponseModel MapRequestToResponse(
            int id,
            ApiTenantRequestModel request)
        {
            var response = new ApiTenantResponseModel();

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