別のタイプの顧客、住所、アカウントの3つの一般的なリストがあるとします。どのようにそれらを 'CustomerProfile'タイプの一般的なリストにまとめますか?タイプの汎用リストをタイプの汎用カスタムリストに結合するにはどうすればよいですか?
Example:
Public class Customer
{
long customerId{ get; set; }
int titleId{ get; set; }
string firstName{ get; set; }
string middleName{ get; set; }
int maritalStatusId { get; set; }
}
public class Address
{
public long addressId{ get; set; }
long customerId{ get; set; }
short addressTypeId{ get; set; }
string postCode{ get; set; }
string geoCodeLattitude{ get; set; }
string geoCodeLongitude{ get; set; }
}
public class Account
{
long accountID{ get; set; }
string accountDesc{ get; set; }
short accountStatusID{ get; set; }
DateTime joinDate{ get; set; }
DateTime insertDateTime{ get; set; }
}
私は新しいCustomerProfileは、結果セットは以下のように見えるべきであるリストを返すとき:
<CustomerProfile>
<Customer>
<customerId>
<titleId>
<firstName>
<middleName>
<maritalStatusId>
</Customer>
<Address>
<addressId>
<customerId>
<addressTypeId>
<postCode>
<geoCodeLattitude>
<geoCodeLongitude>
</Address>
<Account>
<accountID>
<accountDesc>
<accountStatusID>
<joinDate>
<insertDateTime>
</Account>
</CustomerProfile>
'x has'パターンではなく' x is'パターンであるため、インタフェースに移動する必要があります –
XMLはどこに入っていますか?あなたの質問は現在不明です... CustomerProfileクラスはありますか? http://tinyurl.com/so-hints –