You find the addresses you want with the where but then you select some strings from the id.
s.AddressId.Substring(s.AddressId.IndexOf("_")) is string
ie
Select(s => s.AddressId.Substring(s.AddressId.IndexOf("_"))).ToList(); returns a list of substrings
Just remove it and use
AllIDs= AllIDs.Where(s => s.AddressId.Length >= s.AddressId.IndexOf("_")).ToList()
as
Where(s => s.AddressId.Length >= s.AddressId.IndexOf("_"))
filters the list of AllIDs but keeps them as IAddresss
if you rewrite is like this you should be able to see what the problem is
you said
var items = from addr in AllIds
where addr.AddressId.Length >= addr.AddressId.IndexOf("_") // filter applied
select addr.AddressId.Substring(s.AddressId.IndexOf("_")); // select a string from the address
AllIDs = items.ToList(); // hence the error List<string> can't be assigned to List<IAddress>
but you wanted
var items = from addr in AllIds
where addr.AddressId.Length >= addr.AddressId.IndexOf("_") // filter applied
select addr; // select the address
AllIDs = items.ToList(); // items contains IAddress's so this returns a List<IAddress>
List<string>toList<IAddress>...