Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

GetCategories.cs 700B

před 1 rokem
123456789101112131415161718192021222324252627
  1. 
  2. using Karsha_Site.Application.Services.Common.Queries.GetCategory;
  3. using Microsoft.AspNetCore.Mvc;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Threading.Tasks;
  8. namespace EndPoint.Site.ViewComponents
  9. {
  10. public class GetCategories : ViewComponent
  11. {
  12. private readonly IGetCategoryService _getCategoryService;
  13. public GetCategories(IGetCategoryService getCategoryService)
  14. {
  15. _getCategoryService = getCategoryService;
  16. }
  17. public IViewComponentResult Invoke()
  18. {
  19. var categories = _getCategoryService.Execute();
  20. return View(viewName: "GetCategories", categories.Data);
  21. }
  22. }
  23. }