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.

GetCustomer.cs 699B

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