LotoNumber.cs 626 B

12345678910111213141516171819202122232425
  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 LotoNumberModel
  10. {
  11. public Term data;
  12. public string type;
  13. }
  14. public class LotoNumber : ViewComponent
  15. {
  16. public async Task<IViewComponentResult> InvokeAsync(Term data, string type)
  17. {
  18. LotoNumberModel model = new LotoNumberModel();
  19. model.data = data;
  20. model.type = type;
  21. return View("LotoNumber", model);
  22. }
  23. }
  24. }