The DeleteOnSubmit method is used to mark an entity for ___________.

  • Deletion
  • Updating
  • Insertion
  • Deletion or Removal
The correct option is 'Deletion or Removal'. The DeleteOnSubmit method in LINQ to SQL is used to mark an entity for deletion. It does not immediately delete the entity from the database but rather flags it for deletion. The actual deletion occurs when the SubmitChanges method is called on the DataContext. This method is commonly used to prepare objects for deletion before committing changes to the database.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *