/// <summary> /// Constructor that uses dependency injection. /// </summary> /// <param name="ipConfigService">The service to inject.</param> /// <param name="logger">The logger.</param> public IpConfigController(IIpConfigService ipConfigService, ILogger <IpConfigController> logger) { _ipConfigService = ipConfigService ?? throw new ArgumentNullException(nameof(ipConfigService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Constructor that uses dependency injection. /// </summary> /// <param name="sqlDbContext">The context to inject.</param> /// <param name="ipConfigService">The service to inject.</param> /// <param name="logger">The logger.</param> public IpAddressService(ISqlDbContext sqlDbContext, IIpConfigService ipConfigService, ILogger <IpAddressService> logger) { _context = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext)); _ipConfigService = ipConfigService ?? throw new ArgumentNullException(nameof(ipConfigService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }