2012-02-20 7 views
0

を作成するときに、私は足場を使用して新しいコントローラを追加しようとすると、私は足場エラーコントローラ

"Unable to retrieve metadata for 'Model name'. Value cannot be null. Parameter name: key" 

このメッセージが表示されます誰が助けることができますか? これは足場

public class Patient 
    { 
     [Key] 
     public int PatientId { get; set; } 
     public string FirstName { get; set; } 
     public String LastName { get; set; } 
     public int Phone { get; set; } 
     public int FamilyPhone1 { get; set; } 
     public int FamilyPhone2 { get; set; } 
     public string Address { get; set; } 

     public virtual ICollection<Drug> Drugs { get; set; } 
     public virtual ICollection<Test> Tests { get; set; } 
     public virtual ICollection<Alert> Alerts { get; set; } 
     public virtual ICollection<Message> Messages { get; set; } 
    } 

答えて

1
​​ のモデルを使用することです