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); }
public virtual ApiTicketRequestModel MapResponseToRequest( ApiTicketResponseModel response) { var request = new ApiTicketRequestModel(); request.SetProperties( response.PublicId, response.TicketStatusId); return(request); }
public virtual ApiTicketResponseModel MapRequestToResponse( int id, ApiTicketRequestModel request) { var response = new ApiTicketResponseModel(); response.SetProperties(id, request.PublicId, request.TicketStatusId); return(response); }