You need to somehow convert each tbcourse
object to an instance of course
. For instance course
could have a constructor that takes a tbcourse
. You could then write the query like this:
var qry = from c in obj.tbCourses
select new course(c);
List<course> lst = qry.ToList();