var pom= from k in dataContext.student_gods
where k.skgod==System.Convert.ToString(2002/03)
select k;
foreach(var i in pom){
var predmeti = from m in dataContext.student1s
where m.id_stud ==System.Convert.ToString(i.id_stud)
select m;
}
return View(predmeti);
This is code after suggestions. I have one error: the name predmeti does not exist in current context. If declare var predmeti before foreach loop I dont know how to initialize