I have class studentList
public class studentList
{
public static IEnumerable<SelectListItem> GetStudents(int? ID)
{
//code is required here
return ;
}
}
Iam getting ID into this method and now, I require all other IDs from the table, excluding the passed parameter ID using linq.
I have Student table which contains Two fieds StudentID and StudentName,
Now I require IDs and Names of the students in the above pattern..
Could any one help me…
Might like to read : SQL to LINQ ( Visual Representation )
image presentaion might be like