using LotteryWebApp.Service; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace LotteryWebApp.Components { public class TicketHistoryModel { public Ticket data { get; set; } public string winType { get; set; } } public class TicketHistory : ViewComponent { public async Task InvokeAsync(Ticket data, string winType) { TicketHistoryModel model = new TicketHistoryModel(); model.data = data; model.winType = winType; return View("TicketHistory", model); } } }