public CakeOrderService(IUserRepository userRepository, ICakeOrderRepository cakeOrderRepository, INotificationHandler notificationHandler) { _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); _cakeOrderRepository = cakeOrderRepository ?? throw new ArgumentNullException(nameof(cakeOrderRepository)); _notificationHandler = notificationHandler ?? throw new ArgumentNullException(nameof(notificationHandler)); }
//private readonly IEmailService _emailService; //NotificationHandler e taşıdık, NotificiationRules içinde olacak. public CakeOrderService(IUserRepository userRepository, ICakeOrderRepository cakeOrderRepository, INotificationHandler notificationHandler) { _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); _cakeOrderRepository = cakeOrderRepository ?? throw new ArgumentNullException(nameof(cakeOrderRepository)); _notificationHandler = notificationHandler ?? throw new ArgumentNullException(nameof(notificationHandler)); //_emailService = emailService ?? throw new ArgumentNullException(nameof(emailService)); NotificiationRules içinde olacak. }
public CakeOrderService(ICustomerRepository customerRepository, ICakeOrderRepository cakeOrderRepository, IToppingRepository toppingRepository) { _customerRepository = customerRepository; _cakeOrderRepository = cakeOrderRepository; _toppingRepository = toppingRepository; }