Be careful while querying the disposable object inside an using block, you may find that the yielded objects are all disposed before you have used them. To get over this issue use the ToList() method. You can exit the using block, and yield the results out.
Example:
IEnumerable<Student> results;
using (var db = new StudentDataContext())
{
results = db.Students.Where(...).ToList();
}
foreach (var student in results)
{
SomeMethod(student);
yield return student;
}