You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GetMenu.cs 684B

1234567891011121314151617181920212223242526
  1. using Karsha_Site.Application.Services.Common.Queries.GetMenuItem;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Threading.Tasks;
  7. namespace EndPoint.Site.ViewComponents
  8. {
  9. public class GetMenu:ViewComponent
  10. {
  11. private readonly IGetMenuItemService _getMenuItemService;
  12. public GetMenu(IGetMenuItemService getMenuItemService)
  13. {
  14. _getMenuItemService = getMenuItemService;
  15. }
  16. public IViewComponentResult Invoke()
  17. {
  18. var menuItem = _getMenuItemService.Execute();
  19. return View(viewName: "GetMenu", menuItem.Data);
  20. }
  21. }
  22. }