예제 #1
0
        public JsonPatchDocument <ApiSaleTicketsRequestModel> CreatePatch(ApiSaleTicketsRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiSaleTicketsRequestModel>();

            patch.Replace(x => x.SaleId, model.SaleId);
            patch.Replace(x => x.TicketId, model.TicketId);
            return(patch);
        }
예제 #2
0
        public virtual ApiSaleTicketsRequestModel MapResponseToRequest(
            ApiSaleTicketsResponseModel response)
        {
            var request = new ApiSaleTicketsRequestModel();

            request.SetProperties(
                response.SaleId,
                response.TicketId);
            return(request);
        }
예제 #3
0
        public virtual ApiSaleTicketsResponseModel MapRequestToResponse(
            int id,
            ApiSaleTicketsRequestModel request)
        {
            var response = new ApiSaleTicketsResponseModel();

            response.SetProperties(id,
                                   request.SaleId,
                                   request.TicketId);
            return(response);
        }