DataServiceContext.Detach(Object) Method
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.
Removes the entity from the list of entities that the DataServiceContext is tracking.
public:
bool Detach(System::Object ^ entity);
public bool Detach (object entity);
member this.Detach : obj -> bool
Public Function Detach (entity As Object) As Boolean
Parameters
- entity
- Object
The tracked entity to be detached from the DataServiceContext.
Returns
Returns true
if the specified entity was detached; otherwise false
.
Exceptions
When entity
is null
.
Remarks
Once an object is detached, it is no longer tracked by the DataServiceContext.
The Detach method can be called to detach any object, regardless of its EntityStates.
After detaching the specified entity, this method also detaches any links related to the entity.
Applies to
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про