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); }
public virtual ApiSaleTicketsRequestModel MapResponseToRequest( ApiSaleTicketsResponseModel response) { var request = new ApiSaleTicketsRequestModel(); request.SetProperties( response.SaleId, response.TicketId); return(request); }
public virtual ApiSaleTicketsResponseModel MapRequestToResponse( int id, ApiSaleTicketsRequestModel request) { var response = new ApiSaleTicketsResponseModel(); response.SetProperties(id, request.SaleId, request.TicketId); return(response); }