public JsonPatchDocument <ApiRetweetRequestModel> CreatePatch(ApiRetweetRequestModel model) { var patch = new JsonPatchDocument <ApiRetweetRequestModel>(); patch.Replace(x => x.Date, model.Date); patch.Replace(x => x.RetwitterUserId, model.RetwitterUserId); patch.Replace(x => x.Time, model.Time); patch.Replace(x => x.TweetTweetId, model.TweetTweetId); return(patch); }
public virtual ApiRetweetRequestModel MapResponseToRequest( ApiRetweetResponseModel response) { var request = new ApiRetweetRequestModel(); request.SetProperties( response.Date, response.RetwitterUserId, response.Time, response.TweetTweetId); return(request); }
public virtual ApiRetweetResponseModel MapRequestToResponse( int id, ApiRetweetRequestModel request) { var response = new ApiRetweetResponseModel(); response.SetProperties(id, request.Date, request.RetwitterUserId, request.Time, request.TweetTweetId); return(response); }