Пример #1
0
 public ProductsController(IMappedProduct product, IMapper mapper,
                           IMappedCategory category, IWebHostEnvironment webHostEnvironment)
 {
     _product           = product;
     _category          = category;
     _webHostEnviroment = webHostEnvironment;
 }
Пример #2
0
 private readonly CreateValidator _createValidator; // post validator
 public PostsController(ApplicationContext context, IMappedPost mappedPost, IMappedCategory mappedCategory, CreateValidator createValidtor)
 {
     this._mappedCategory  = mappedCategory;
     this._mappedPost      = mappedPost;
     this._createValidator = createValidtor;
     _context = context;
 }
 public CategoriesController(
     ICategoryRepository categoryRepository,
     IMappedCategory mappedCategory,
     CreateValidator createValidator,
     EditValidator editValidator
     )
 {
     this._mappedCategory     = mappedCategory;
     this._categoryRepository = categoryRepository;
     this._createValidator    = createValidator;
     this._editValidator      = editValidator;
 }
Пример #4
0
 public CategoriesController(IMappedCategory category, IMapper mapper)
 {
     _category = category;
 }