HeaderHome.cs 677 B

1234567891011121314151617181920212223242526
  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 HeaderHomeModel
  10. {
  11. public Profile profile;
  12. public UserStatus userStatus;
  13. }
  14. public class HeaderHome : ViewComponent
  15. {
  16. public async Task<IViewComponentResult> InvokeAsync(Profile profile, UserStatus userStatus)
  17. {
  18. HeaderHomeModel model = new HeaderHomeModel();
  19. model.profile = profile;
  20. model.userStatus = userStatus;
  21. return View("HeaderHome", model);
  22. }
  23. }
  24. }