0
sampath created
Could you tell me how to set the 1 : 1 relationship with the below mentioned models when we use the Asp.net Boiler plait ? Thanks in advance.
Note : I have seen this nice answer about the EF 1 to 1 relationship.But unfortunately I don't know how to set it with the Boiler plate.B'cos PK is automatically taken from the ABP.On my scenario where both tables having int PK.
SO : [url]http://stackoverflow.com/questions/6531671/what-does-principal-end-of-an-association-means-in-11-relationship-in-entity-fr
Note 2 : Here Property and Address models having 1 : 1 Relationship.
Property Model
[Table("IpProperties")]
public class Property : FullAuditedEntity
{
public virtual bool Vacant { get; set; }
public virtual Address Address { get; set; }
}
Address Model
[Table("IpAddresses")]
public class Address : FullAuditedEntity
{
[Required]
[MaxLength(MaxLength)]
public virtual string StreetNumber { get; set; }
public virtual Property Property { get; set; }
}
2 Answer(s)
-
0
Have you seen my this answer to same question: #466@7b81740d-0732-4192-9225-78c030a6aa6e
-
0
Yes.I saw that.Thanks a lot Halil :)