I am trying to fetch an IP-address column which is present in both tables, A and B. Table A has many IP-adresses and a specific IP-address which is not present in table B. I want distinct IP-addresses from both the tables. That means I want all IP-adresses from table A which are not present in table B, plus all IP-adresses from table B which are not present in table A. I am trying the below code which is only giving me the IP-adresses which are not present in table B. Please help.
var ips= (from a in CS.A
where !CS.B.Any(f => f.IPAddress == a.IPAddress)
select a.IPAddress).Distinct();