public ProfitsController(IProfitService profitService, IProfitFacade profitFacade, IMyMapper mapper) { _profitService = profitService ?? throw new ArgumentNullException(nameof(profitService)); _profitFacade = profitFacade ?? throw new ArgumentNullException(nameof(profitFacade)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public ProfitController(IProfitService profitService) { _profitService = profitService; }
public ProfitFacade(ITradeService tradeService, IProfitService profitService) { _tradeService = tradeService; _profitService = profitService; }
//// adding ProfitService with Dependency Injection so that my service //// layer can be instantiated by the application, and I need only to access //// it in the controller, decoupling them public ProfitController(IProfitService service) { profitService = service; }
public ProfitController(ILog log, IProfitService p) { _log = log; _profitService = p; }
public ProfitsController() { this.profitService = new ProfitService(); validator = new ValidateRoles(); }
public ProfitsController(IProfitService profitService) { this.profitService = profitService; validator = new ValidateRoles(); }