asp.net(MVC) linq语句多条件查询

日期:2016-10-15 04:26:25 人气:1

asp.net(MVC) linq语句多条件查询

linq的多条件查询无非就是用where方法。 var entitys=entityFacade.GetAll().ToDataSourceResult(request, ModelState); if(!string.IsNullOrEmpty(SID)){ entitys=entitys.Where(x=>x.SID=='123'); } if(!string.IsNullOrEmpty(SPwd)){ entitys=entitys.Where(x=>x.SPw
    A+
热门评论