|
123456789101112131415161718192021222324252627 |
-
- using Karsha_Site.Application.Services.Common.Queries.GetCategory;
- using Microsoft.AspNetCore.Mvc;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
-
- namespace EndPoint.Site.ViewComponents
- {
- public class GetCategories : ViewComponent
- {
- private readonly IGetCategoryService _getCategoryService;
- public GetCategories(IGetCategoryService getCategoryService)
- {
- _getCategoryService = getCategoryService;
- }
-
-
- public IViewComponentResult Invoke()
- {
- var categories = _getCategoryService.Execute();
- return View(viewName: "GetCategories", categories.Data);
- }
-
- }
- }
|