Metodo ObjectContext.ApplyPropertyChanges
[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]
Nota: questa API è ora obsoleta.
Applica le modifiche delle proprietà da un oggetto disconnesso a un oggetto già connesso al contesto dell'oggetto.
Spazio dei nomi: System.Data.Entity.Core.Objects
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
<ObsoleteAttribute("Use ApplyCurrentValues instead")> _
<BrowsableAttribute(False)> _
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Overridable Sub ApplyPropertyChanges ( _
entitySetName As String, _
changed As Object _
)
'Utilizzo
Dim instance As ObjectContext
Dim entitySetName As String
Dim changed As Object
instance.ApplyPropertyChanges(entitySetName, _
changed)
[ObsoleteAttribute("Use ApplyCurrentValues instead")]
[BrowsableAttribute(false)]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public virtual void ApplyPropertyChanges(
string entitySetName,
Object changed
)
[ObsoleteAttribute(L"Use ApplyCurrentValues instead")]
[BrowsableAttribute(false)]
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
public:
virtual void ApplyPropertyChanges(
String^ entitySetName,
Object^ changed
)
[<ObsoleteAttribute("Use ApplyCurrentValues instead")>]
[<BrowsableAttribute(false)>]
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
abstract ApplyPropertyChanges :
entitySetName:string *
changed:Object -> unit
[<ObsoleteAttribute("Use ApplyCurrentValues instead")>]
[<BrowsableAttribute(false)>]
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
override ApplyPropertyChanges :
entitySetName:string *
changed:Object -> unit
public function ApplyPropertyChanges(
entitySetName : String,
changed : Object
)
Parametri
- entitySetName
Tipo: System.String
Nome del set di entità a cui appartiene l'oggetto.
- changed
Tipo: System.Object
Oggetto disconnesso contenente gli aggiornamenti delle proprietà da applicare all'oggetto originale.
Eccezioni
Eccezione | Condizione |
---|---|
ArgumentNullException | Quando entitySetName è Null o una stringa vuota o quando changed è Null. |
InvalidOperationException | Quando EntitySet derivante da entitySetName non corrisponde a EntitySet di EntityKey dell'oggetto o quando l'entità si trova in uno stato diverso da Modified o Unchanged oppure l'oggetto originale non è collegato al contesto. |
ArgumentException | Quando il tipo dell'oggetto changed non è lo stesso tipo dell'oggetto originale. |