炫意html5
最早CSS3和HTML5移动技术网站之一

这句sql如何翻译成linq?

sql=“select Code, StudentName  from [Student]”
if(TeacherName!=""){
sql+=" ,[Teacher] where [Student].TeacherName = [Teacher] .TeacherName Where         [Teacher].TeacherName=TeacherName"
}

回答

            var teacherName = string.Empty;
            var teachers = new List<(string Code, string TeacherName)>();
            new List<(string Code, string StudentName, string TeacherName)>()
                .Where(t => !string.IsNullOrEmpty(teacherName) && teachers.Any(g => g.TeacherName == teacherName));

闲来无聊,预计是这么个意思,送一下代码。

炫意HTML5 » 这句sql如何翻译成linq?

Java基础教程Android基础教程