delete equivalent in linq query

Posted by Sahoo under Sql Server on 2/9/2012 | Points: 10 | Views : 1137 | Status : [Member] | Replies : 1
Hi

delete from student where student_id=5;

how to write it in linq?




Responses

Posted by: Blessyjees on: 2/9/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

I think that you are not able to write direct delete query using linq. But you can do this in Linq to sql model
like datacontext.order.DeleteOnsubmit(orderentity).

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sahoo, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response