.net 在Linq to SQL查询中设置非列属性值

.net 在Linq to SQL查询中设置非列属性值,.net,linq-to-sql,.net,Linq To Sql,有没有办法在查询中设置不是由Linq到SQL设计器生成的属性(不是数据库中的列) 例如,是否有类似SomeMethod()的方法: IQuaryable查询=(来自context.MyTable中的t 其中{某些条件} 选择t)SomeMethod(“MyPropertyName”,value); 类似 var query = (from t in context.MyTable where {some conditions}

有没有办法在查询中设置不是由Linq到SQL设计器生成的属性(不是数据库中的列)

例如,是否有类似SomeMethod()的方法:

IQuaryable查询=(来自context.MyTable中的t
其中{某些条件}
选择t)SomeMethod(“MyPropertyName”,value);
类似

var query = (from t in context.MyTable
                  where {some conditions}
                  select new {t, MyPropertyName = value });
我不确定这是否是你要问的

var query = (from t in context.MyTable
                  where {some conditions}
                  select new {t, MyPropertyName = value });