我想为这种情况声明空变量,
if(........)
{
emptyIQueryable= DBContext.MyTables.Join(MyTableTwos , x => x.ID , i => i.TID , ((x,i) =>
new{
x,i
}
)).Where(x => x.ID == 1).SingleOrDefault();
}
else
{
emptyIQueryable= DBContext.MyTables.Join(MyTableTwos , x => x.ID , i => i.TID , ((x,i) =>
new{
x,i
}
)).Where(x => x.ID == 2).SingleOrDefault();
}
我该如何申报?