where c.工号 == this.gh.Text.Trim() && c.密码 == this.pwd.Text
select c.权限).ToList()
if (lst.Count < 0)
{
var entity = lst[0]
var right = entity.权限
switch(right)
{
case 0:
break
case 1:
break
//case 2,3,4......
default:
break
}
}
望采纳
int countSchool(int? age) {return sql.Student.Count(row =>row.age == age ?? 这里写默认值)
}
例如
int countSchool(int? age) {
return sql.Student.Count(row =>row.age == age ?? 20)
}
这就是当age传过来的值为空时,取默认值20
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)