我想加入两个在它们之间没有任何引用的类,并从每个类中选择一个属性。
例如:
public class AssignedLocations
{
...
public string LocationCode
{get;set;}
...
}
public class Identifiers
{
public string Identifier
{get;set;}
public string Code
{get;set;}
public string Description
{get;set;}
...
}
我需要像下面这样加入以上课程;
选择al.location_code,即来自assigned_locations al的描述, 标识符i,其中i.identifier ='LOCA'和i.code = al.location_code;
我在我的项目中使用NHibernate的Criteria API。
任何指针都是有帮助的。