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.

123456789101112131415161718192021222324252627
  1. using Karsha_Site.Application.Services.Common.Queries.GetCustomer;
  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 GetCustomer:ViewComponent
  10. {
  11. private readonly IGetCustomerService _getCustomerService;
  12. public GetCustomer(IGetCustomerService getCustomerService)
  13. {
  14. _getCustomerService = getCustomerService;
  15. }
  16. public IViewComponentResult Invoke()
  17. {
  18. var customers = _getCustomerService.Execute();
  19. return View(viewName: "GetCustomer", customers.Data);
  20. }
  21. }
  22. }