If you have PracticeID as an int you should be working with int's IMO.
This is how I would do it
Create a console app and paste the following code:
using System;
using System.Collections.Generic;
using System.Linq;
namespace Linq_Contains_Any
{
class Program
{
static void Main(string[] args)
{
int[] idsToBeSearched = new int[] { 1, 3, 4 };
List<practice> Practices = new List<practice>();
Practices.Add(new Practice { PracticeID = 1, PracticeName = "AAAAAAAA" });
Practices.Add(new Practice { PracticeID = 2, PracticeName = "BBBBBBBB" });
Practices.Add(new Practice { PracticeID = 3, PracticeName = "CCCCCCCC" });
Practices.Add(new Practice { PracticeID = 4, PracticeName = "DDDDDDDD" });
Practices.Add(new Practice { PracticeID = 5, PracticeName = "EEEEEEEE" });
Practices.Add(new Practice { PracticeID = 6, PracticeName = "FFFFFFFF" });
Practices.Add(new Practice { PracticeID = 7, PracticeName = "GGGGGGGG" });
Practices.Add(new Practice { PracticeID = 8, PracticeName = "HHHHHHHH" });
Practices.Add(new Practice { PracticeID = 9, PracticeName = "IIIIIIII" });
Practices.Add(new Practice { PracticeID = 10, PracticeName = "JJJJJJJJ" });
var result = from p in Practices
where idsToBeSearched.Any(id => p.PracticeID == id)
select p;
foreach (var item in result)
{
Console.WriteLine(string.Format("ID {0} - {1}", item.PracticeID, item.PracticeName));
}
Console.ReadLine();
}
}
public class Practice
{
public int PracticeID { get; set; }
public string PracticeName { get; set; }
}
}
</practice></practice>
The result output will be
ID 1 - AAAAAAAA
ID 3 - CCCCCCCC
ID 4 - DDDDDDDD