Posted on: 7/29/2014 1:57:47 AM | Views : 417

Hello,

I have two classes as follows

public class Student { public Student() { } public int StudentID { get; set; } public string StudentName { get; set; } public virtual Address B { get; set; } // navigation property to ClassB, one-to-many } and
public class Address { public Address(){} public int AddressId { get; set; } //[ForeignKey("AddressId")] public string AddressStreet { get; set; } public string AddressPostCode { get; set; } } You can see AddressId is a foreign key on the Student Class, When I create the database and extend the Student class the column name for AddressId is B_AddressID how can I change it to AddressID.

Thanks

Go to the complete details ...