我一直在努力爲客戶及其聯繫人在MVC 4 EF代碼中首次實現以下邏輯。如何在MVC 4代碼中實現主細節表數據插入首先得到
客戶表
public int ID { get; set; }
public string Name{ get; set; }
public string Address { get; set; }
customer_contact表
public int CustomerID { get; set; }
public string ContactName { get; set; }
public string PhoneNo { get; set; }
public string Email { get; set; }
在這種情況下一個客戶得到一個以上的聯繫方式與外鍵引用。請任何人指導我做到這一點。感謝和進步。