LotoNumberHistory.cs 773 B

1234567891011121314151617181920212223242526272829
  1. using LotteryWebApp.Service;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Threading.Tasks;
  7. namespace LotteryWebApp.Components
  8. {
  9. public class LotoNumberHistoryModel
  10. {
  11. public string[] data;
  12. public string type;
  13. public Term term;
  14. }
  15. public class LotoNumberHistory : ViewComponent
  16. {
  17. public async Task<IViewComponentResult> InvokeAsync(string[] data, Term term, string type)
  18. {
  19. LotoNumberHistoryModel model = new LotoNumberHistoryModel();
  20. model.data = data == null ? new string[] { } : data;
  21. model.type = type;
  22. model.term = term;
  23. return View("LotoNumberHistory", model);
  24. }
  25. }
  26. }