问题描述
实际上我根据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();
}
推荐答案
ObjNotificationDetails = ObjNotificationDetails.Where(a => a.IsActive.ToString() == objNotificationBO.IsActive.ToString()).ToList();
这篇关于lambda表达式返回“0”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!