I have a function that should return the Id of the element passed in parameters, like :
public static Int32 getIdByName(string name)
{
var query = from student in DataAccess.getInstance.StudentSet
where student.FirstName.Equals(name)
select student;
return toto;
}
I don’t know how to convert the result toto to an Int32 and return it !!
1 Answer