Linq to SQL: Delete an entity using Primary Key only

Linq to Sql does not come with a function like .Delete(ID) which allows you to delete an entity using it’s primary key. You have to first get the object that you want to delete and then call .DeleteOnSubmit(obj) to queue it for delete. Then you Read More...

Read the complete post at http://feedproxy.google.com/~r/OmarAlZabirBlog/~3/YXw8_xnXYOs/linq-to-sql-delete-an-entity-using-primary-key-only.aspx

Published 10-30-2008 7:27 AM by Omar AL Zabir blog on ASP.NET Ajax and .NET 3.5
Filed under: , ,
Powered by Community Server (Non-Commercial Edition), by Telligent Systems