Hi Halil,
That url is not working ? Could you correct it ? Thank in advance.
Hi Halil,
Thanks for the reply. Actually the ids are the same. Please see the attached image. One thing I have to note that here that is, The relationship between the "Properties" and "Addresses" tables are 1 : 1 (I have mentioned it on the image also).Is that the issue here ? If so then how can I sort out this issue ?
If there is no other solution could you tell me how to do custom mapping as you mentioned above.Just a reference or simple example is more than enough. Thanks in advance.
Here is the imge url : <a class="postlink" href="http://imgur.com/a/cJdei">http://imgur.com/a/cJdei</a>
Address :
[Table("IpAddresses")]
public class Address : FullAuditedEntity
{
public const int MaxLength = 50;
[Key, ForeignKey("Property")]
public override int Id { get; set; }
[Required]
[MaxLength(MaxLength)]
public virtual string StreetNumber { get; set; }
[Required]
[MaxLength(MaxLength)]
public virtual string StreetName { get; set; }
[ForeignKey("CityId")]
public virtual City City { get; set; }
public virtual int CityId { get; set; }
[ForeignKey("StateId")]
public virtual State State { get; set; }
public virtual int StateId { get; set; }
public virtual Property Property { get; set; }
}
Hi Halil,
Wow... Thanks a lot :)
Thanks a lot Halil. It works :)
Yes.I saw that.Thanks a lot Halil :)