public void CreateOutgClientFile(TypeOfClient typeOfClient, TypeOfExport typeOfExport) { Console.WriteLine("Retrieving all Clients from database ---"); // Dankzij include in repos hebben we per Client ook Country en Doctor (N: 1) // Dankzij include in repos hebben we per Client ook al zijn Consults (1:N) var listClient = _clientRepository.GetAllWithConsults(); switch (typeOfClient) { case TypeOfClient.Big: ClientHandler <BigClient> .CreateOutgoingClients(listClient, typeOfClient, typeOfExport, _configuration); break; case TypeOfClient.Small: ClientHandler <SmallClient> .CreateOutgoingClients(listClient, typeOfClient, typeOfExport, _configuration); break; case TypeOfClient.Criminal: ClientHandler <CriminalClient> .CreateOutgoingClients(listClient, typeOfClient, typeOfExport, _configuration); break; case TypeOfClient.WithManyConsults: ClientHandler <WithManyConsultsClient> .CreateOutgoingClients(listClient, typeOfClient, typeOfExport, _configuration); break; default: throw new InvalidEnumArgumentException(); } }