This is my code that works great:
  IPRepository rep = new IPRepository();
  var Q = rep.GetIp()
        .Where(x => x.CITY == CITY)
        .GroupBy(y => o.Fam)
        .Select(z => new IpDTO
        {
          IId = z.Key.Id,
          IP = z.Select(x => x.IP).Distinct()
       });
IP is IEnumerable<string>
- I need to add to this code above a call to a function PAINTIP(ip).
- I need to send each one of the elements that will be inside IP to a function PAINTIP(ip). therefore i need to use some kind of foreach function but i cannot figure out how.
 
     
     
     
     
    