473,546 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delete multiple records with Linq

Hi,

How can I delete multiple records with Linq?

On the internet I found the DeleteAll function, but this one does not exist
in my library.

Please help me out.

Thanks!

Jul 9 '08 #1
2 8115
Scott Guthrie has this on his blog post introducing linq to sql. Its about
half way down although the whole post is a good talk through the updating the
database part of linq.
Have a look here:
http://weblogs.asp.net/scottgu/archi...-database.aspx
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Arjen" wrote:
Hi,

How can I delete multiple records with Linq?

On the internet I found the DeleteAll function, but this one does not exist
in my library.

Please help me out.

Thanks!

Jul 10 '08 #2
Dude,

First things first. as the abbreviation of LINQ is Language INtegrated
QUERY. which is majorly targeted for QUERYing, but not for all the CRUD
operations.

secondly, as mentioned in SCOTT's blog, you have to narrow done to that
SINGLE record using expression, then use the DELETEALL ..

HTH

"Arjen" <bo*****@hotmai l.comwrote in message
news:DA******** *************** ***********@mic rosoft.com...
Hi,

How can I delete multiple records with Linq?

On the internet I found the DeleteAll function, but this one does not
exist in my library.

Please help me out.

Thanks!
Jul 10 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1529
by: axas | last post by:
How can I delete multiple records from a DataGrid? Thanks.
3
2539
by: Jeff | last post by:
In a subform I have a simple SQL statement that links an order details table to a product table. The form is used to enter order details. Most fields are obviously from the details table, with only a UOM field from the product table. This has worked fine for years, I thought. The problem I seem to have is that if the user makes a mistake...
1
2587
by: saurabhbpl | last post by:
hi, i want to delete record that check by checkbox and also if i select all option than all record select delete after press the delete button like a yahoo email and hotmail.plz. give me suggestion, thanks & egards, saurabh.
3
5919
madhoriya22
by: madhoriya22 | last post by:
I have solved the problem
4
2309
by: abdul razak | last post by:
delete multiple records by checking checkboxes records from database use javascript
11
2777
by: Ganesh R | last post by:
Hi Friends... Can anyone plz help me out i'm stuck .... I want to delete multiple records from a data grid using cursors.the parameter for the stored procedure is an comma seperated string(of User_ID),but the stored procedure which i had written is not working can anyone help me out,it would be a great help for me.when i execute the...
7
6396
by: mukeshrasm | last post by:
hello everyone I want to delete the selected records from database using checkbox. whch is generated dyanamically and checkbox is also generated dynamically,using php. so please help me. if you may give some code, it will be better for me thanks..
1
2228
by: busterbaxter | last post by:
Hi All, I have an existing inventory database that I'm trying to make changes to. The database only has 1 table with the following fields: PartNumber ItemDescription Category Location Owner SerialNumber.
15
5042
by: busterbaxter | last post by:
I have an existing inventory database that I'm trying to make changes to. The database only has 1 table with the following fields: PartNumber ItemDescription Category Location Owner SerialNumber. Currently I'm using the delete button to delete a single item.
0
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.