see the below code
using (var context = new SchoolDBEntities()) {var stud1 = (from s in context.Students.Include("Standard") where s.StudentName == "Student1" select s).FirstOrDefault<Student>(); }
tell me why we need to specify studen inside firstordefault like FirstOrDefault<Student>() ?
if i write like this way then it will not work ?
using (var context = new SchoolDBEntities())
{
var stud1 = (from s in context.Students.Include("Standard")
where s.StudentName == "Student1"
select s).FirstOrDefault();
}