1、以...开头 StartsWith
Repeater1.DataSource=con.Users.Where(r=>r.Nickname.StartsWith("李"));
Repeater1.DataBind();
2、以...结尾 EndsWith
Repeater1.DataSource=con.Users.Where(r=>r.Nickname.EndsWith("同"));
Repeater1.DataBind();
3、模糊差(包含) Contains
Repeater1.DataSource=con.Users.Where(r=>r.Nickname.Contains("蘇"));
Repeater1.DataBind();
4、个数
时间: 2024-10-13 01:28:09