Click here to Skip to main content
15,902,198 members

Comments by Member 11210682 (Top 1 by date)

Member 11210682 6-Nov-14 1:50am View    
var query = from c in _studentRepository.Table
orderby c.StudentID
select new Student
{ StudentID=c.StudentID,
FirstName=c.FirstName,
LastName=c.LastName,
Age=c.Age
};


After Implementing the Above code it gives error as " Cannot Initialize type 'Student' with a collection initialize beacuse it does not implement 'System.Collections.IEnumerable' "