Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public virtual ApiRetweetRequestModel MapResponseToRequest(
            ApiRetweetResponseModel response)
        {
            var request = new ApiRetweetRequestModel();

            request.SetProperties(
                response.Date,
                response.RetwitterUserId,
                response.Time,
                response.TweetTweetId);
            return(request);
        }
Ejemplo n.º 3
0
        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);
        }