コード例 #1
0
 public ProductController(IProductPageService productPageService, IIndexPageService indexPageService, IWebHostEnvironment hostingEnvironment, ICategoryPageService categoryPageService)
 {
     _productPageService  = productPageService;
     _indexPageService    = indexPageService;
     _hostingEnvironment  = hostingEnvironment;
     _categoryPageService = categoryPageService;
 }
コード例 #2
0
ファイル: Details.cshtml.cs プロジェクト: yasir2000/aspnetrun
 public DetailsModel(IProductPageService productPageService)
 {
     _productPageService = productPageService ?? throw new ArgumentNullException(nameof(productPageService));
 }
コード例 #3
0
        private readonly ICartComponentService _cartComponentService; // due to every page has cart, we also inject cart view component service in order to catch post actions

        public ProductsModel(IProductPageService productPageService, ICartComponentService cartComponentService)
        {
            _productPageService   = productPageService ?? throw new ArgumentNullException(nameof(productPageService));
            _cartComponentService = cartComponentService ?? throw new ArgumentNullException(nameof(cartComponentService));
        }