Delete entity or collection in Linq to SQL without getting them (msmvps.com)

published 1 year, 3 months ago, submitted by oazabiroazabir(1530) 1 year, 3 months ago

In order to delete an entity or a collection of entity in Linq to SQL, you have to first get them and then delete them. This requires additional database roundtrip. Here's a strongly typed maintenance free way to delete entities directly using their primary key.

add a comment | category: | Views: 508

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

No comments so far

information Login or create an account to comment on this story