本文整理汇总了C#中System.Data.Linq.Mapping.AssociationAttribute.IsForeignKey属性的典型用法代码示例。如果您正苦于以下问题:C# AssociationAttribute.IsForeignKey属性的具体用法?C# AssociationAttribute.IsForeignKey怎么用?C# AssociationAttribute.IsForeignKey使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Data.Linq.Mapping.AssociationAttribute
的用法示例。
在下文中一共展示了AssociationAttribute.IsForeignKey属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: if
[Association(Name="FK_CustomerCustomerDemo", Storage="_CustomerDemographic", ThisKey="CustomerTypeID", IsForeignKey=true)]
public CustomerDemographic CustomerDemographic
{
get
{
return this._CustomerDemographic.Entity;
}
set
{
CustomerDemographic previousValue = this._CustomerDemographic.Entity;
if (((previousValue != value)
|| (this._CustomerDemographic.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._CustomerDemographic.Entity = null;
previousValue.CustomerCustomerDemos.Remove(this);
}
this._CustomerDemographic.Entity = value;
if ((value != null))
{
value.CustomerCustomerDemos.Add(this);
this._CustomerTypeID = value.CustomerTypeID;
}
else
{
this._CustomerTypeID = default(string);
}
this.SendPropertyChanged("CustomerDemographic");
}
}
}