public JsonPatchDocument <ApiSubscriptionRequestModel> CreatePatch(ApiSubscriptionRequestModel model) { var patch = new JsonPatchDocument <ApiSubscriptionRequestModel>(); patch.Replace(x => x.IsDisabled, model.IsDisabled); patch.Replace(x => x.JSON, model.JSON); patch.Replace(x => x.Name, model.Name); patch.Replace(x => x.Type, model.Type); return(patch); }
public virtual ApiSubscriptionRequestModel MapResponseToRequest( ApiSubscriptionResponseModel response) { var request = new ApiSubscriptionRequestModel(); request.SetProperties( response.IsDisabled, response.JSON, response.Name, response.Type); return(request); }
public virtual ApiSubscriptionResponseModel MapRequestToResponse( string id, ApiSubscriptionRequestModel request) { var response = new ApiSubscriptionResponseModel(); response.SetProperties(id, request.IsDisabled, request.JSON, request.Name, request.Type); return(response); }