我是.Net的新手.我有两个对象,Customer并Country在我的项目:
public class Customer
{
public int CustomerId {get;set;}
public string CustomerName {get;set}
public String Street {get;set}
public String Address {get;set}
public int CountryId {get;set}
//...o
}
public class Country
{
public int CountryId {get;set;}
public String CountryName{get;set}
}
Run Code Online (Sandbox Code Playgroud)
我有两个清单,List<Customer>和List<Country>.
我正在使用sql join语句列出具有国家/地区的客户.但我很困惑如何创建一个包含客户以及国家/地区名称的列表.
是否有必要为此创建单独的类?
提前致谢.
c# ×1