Esempio n. 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);
        }
Esempio n. 2
0
        public virtual ApiSaleTicketsRequestModel MapResponseToRequest(
            ApiSaleTicketsResponseModel response)
        {
            var request = new ApiSaleTicketsRequestModel();

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

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