【发布时间】:2012-12-17 16:28:04
【问题描述】:
如何使用 join() 表达式?
/// <summary>
/// Searches the specified term.
/// </summary>
/// <param name="term">The term.</param>
/// <returns></returns>
public List<City> Search(string term, string countryAbbrev, string provinceAbbrev)
{
//if(!string.IsNullOrEmpty(country) && !string.IsNullOrEmpty(province))
return context.Cities.join(????).Where(Cty => Cty.Name.Contains(term)).ToList();
}
我想加入Province 和country。我知道如何处理“From .. in .. join..”但不知道这个表达式Join(???)
【问题讨论】:
-
非常感谢!!!!这就是我的解决方案
标签: entity-framework linq-to-entities inner-join