ColumnAttribute.AutoSync Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the AutoSync enumeration.
public:
property System::Data::Linq::Mapping::AutoSync AutoSync { System::Data::Linq::Mapping::AutoSync get(); void set(System::Data::Linq::Mapping::AutoSync value); };
public System.Data.Linq.Mapping.AutoSync AutoSync { get; set; }
member this.AutoSync : System.Data.Linq.Mapping.AutoSync with get, set
Public Property AutoSync As AutoSync
Property Value
The AutoSync value.
Examples
[Column(Storage="_EmployeeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int EmployeeID
{
get
{
return this._EmployeeID;
}
set
{
if ((this._EmployeeID != value))
{
this.OnEmployeeIDChanging(value);
this.SendPropertyChanging();
this._EmployeeID = value;
this.SendPropertyChanged("EmployeeID");
this.OnEmployeeIDChanged();
}
}
}
<Column(Storage:="_EmployeeID", DbType:="Int", AutoSync:=AutoSync.OnInsert)> _
Public Property EmployeeID() As System.Nullable(Of Integer)
Get
Return Me._EmployeeID
End Get
Set(ByVal value As System.Nullable(Of Integer))
If (Me._EmployeeID.Equals(value) = False) Then
If Me._Employee.HasLoadedOrAssignedValue Then
Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
End If
Me.OnEmployeeIDChanging(value)
Me.SendPropertyChanging()
Me._EmployeeID = value
Me.SendPropertyChanged("EmployeeID")
Me.OnEmployeeIDChanged()
End If
End Set
End Property
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.