Qry = "select childID,ChildEmail,ChildUserID, ChildPassword from ChildProfile ";
Qry = Qry + " where ucase(ChildFName) = '"
+ Strings.UCase(Strings.Trim(Txtname.Text))
+ "' and ucase(childlname) = '"
+ Strings.UCase(Strings.Trim(txtSurName.Text))
+ "' and childmobile = '"
+ Strings.Trim(txtMobile.Text) + "'";
如何将此查询转换为 LINQ
List<PatientDTO> lstChildProf = objService.GetAllPatient();
lstChildProf = new List<PatientDTO>(
from l in lstChildProf where
);
不知道这里怎么写where子句
请帮忙
像这样:
List<PatientDTO> lstChildProf = objService.GetAllPatient()
.Where( l => l.ChildFName == Strings.UCase(Strings.Trim(Txtname.Text))
&& l.ChildName == Strings.UCase(Strings.Trim(txtSurName.Text))
&& l.chiuldMob == Strings.Trim(txtMobile.Text))
.ToList<PatientDTO>();