public InsuranceController(IInsuranceRepository insuranceRepository, IProvInsurRepository provInsurRepository, ILogger <InsuranceController> logger) { _insuranceRepository = insuranceRepository ?? throw new ArgumentNullException(nameof(insuranceRepository)); _provInsurRepository = provInsurRepository ?? throw new ArgumentException(nameof(provInsurRepository)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogInformation($"Accessed InsuranceController"); }
// GET: api/provider /// <summary> Fetches all providers in the database. Can add a search parameter to narrow search. Null returns all. /// <param name="search"> string - This string is searched for in the body of multiple fields related to provider. </param> /// <returns> A content result. /// 200 with A list of providers, depending on input search /// 500 if server error /// </returns> /// </summary> public ProviderController(IProviderRepository providerRepository, IFacilityRepository facilityRepository, ISpecialtyRepository specialtyRepository, IProvInsurRepository provInsurRepository, ILogger <ProviderController> logger) { _providerRepository = providerRepository ?? throw new ArgumentException(nameof(providerRepository)); _facilityRepository = facilityRepository ?? throw new ArgumentException(nameof(facilityRepository)); _specialtyRepository = specialtyRepository ?? throw new ArgumentException(nameof(specialtyRepository)); _provInsurRepository = provInsurRepository ?? throw new ArgumentException(nameof(provInsurRepository)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogInformation($"Accessed ProviderController"); }