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