实际上我根据Country_ID获得了30条记录,但是在进入这条线之后它会给出0值,请你帮我这个 ObjNotificationDetails = ObjNotificationDetails.Where (a => a.Country_Id == objNotificationBO.Country_Id)。ToList(); 这是程序参数 @Subject = '', @ApplicationId = 0, @CountryId = 12, @UserId = 0, @StartDate = null, @EndDate = null, @IsActive = true 这里我剪我的代码也是 ObjNotificationDetails = NotificationDL.FetchNotificationDetails(objNotificationBO); ObjNotificationDetails = ObjNotificationDetails.Where(a => a.IsActive = = objNotificationBO.IsActive)。ToList(); if(objNotificationBO.Country_Id!= 0) { ObjNotificationDetails = ObjNotificationDet ails.Where(a => a.Country_Id == objNotificationBO.Country_Id)。ToList(); }
Actually im getting 30 records based on Country_ID but after going to this line it is giving 0 value could you please help me on this ObjNotificationDetails = ObjNotificationDetails.Where(a => a.Country_Id == objNotificationBO.Country_Id).ToList(); this is procedure parameters @Subject = '', @ApplicationId = 0, @CountryId = 12, @UserId = 0, @StartDate = null, @EndDate = null, @IsActive = true and here im shearing my code also ObjNotificationDetails = NotificationDL.FetchNotificationDetails(objNotificationBO); ObjNotificationDetails = ObjNotificationDetails.Where(a => a.IsActive == objNotificationBO.IsActive).ToList(); if (objNotificationBO.Country_Id != 0) { ObjNotificationDetails = ObjNotificationDetails.Where(a => a.Country_Id == objNotificationBO.Country_Id).ToList(); }
推荐答案试试这个 Try this ObjNotificationDetails = ObjNotificationDetails.Where(a => a.IsActive.ToString() == objNotificationBO.IsActive.ToString()).ToList();
更多推荐
lambda表达式返回“0”
发布评论