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

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

            request.SetProperties(
                response.PublicId,
                response.TicketStatusId);
            return(request);
        }
コード例 #3
0
        public virtual ApiTicketResponseModel MapRequestToResponse(
            int id,
            ApiTicketRequestModel request)
        {
            var response = new ApiTicketResponseModel();

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