日期:2014-05-17 浏览次数:20472 次
var data = from c in db.T_COURSE join u in db.T_USER_COURSE_RECORD on new { COURSE_ID=c.COURSE_ID, USER_ID=userId } equals new { COURSE_ID=u.COURSE_ID,USER_ID=u.USER_ID } into x from cx in x.DefaultIfEmpty() select new { c.COURSE_NAME, cx.COURSE_ID, cx.USER_COURSE_ID, cx.USER_ID, SCORE = cx.SCORE == -1 ? "未完成" : (cx.SCORE == null ? "未完成" : cx.SCORE.ToString()) };