Table<TEntity>.ITable.DeleteOnSubmit(Object) Method
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.
Puts an entity from this table into a pending delete
state.
virtual void System.Data.Linq.ITable.DeleteOnSubmit(System::Object ^ entity) = System::Data::Linq::ITable::DeleteOnSubmit;
void ITable.DeleteOnSubmit (object entity);
abstract member System.Data.Linq.ITable.DeleteOnSubmit : obj -> unit
override this.System.Data.Linq.ITable.DeleteOnSubmit : obj -> unit
Sub DeleteOnSubmit (entity As Object) Implements ITable.DeleteOnSubmit
- entity
- Object
The entity to be removed.
This member is an explicit interface member implementation. It can be used only when the Table<TEntity> instance is cast to an ITable interface.
Note
LINQ to SQL does not support or recognize cascade-delete operations. If you want to delete a row in a table that has constraints against it, you must either set the ON DELETE CASCADE
rule in the foreign-key constraint in the database, or use your own code to first delete the child objects that prevent the parent object from being deleted. Otherwise, an exception is thrown.
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: