How C# performs sql procedure?

Assume there are three tables in one database created by MSDE, and they are related by using "id", for example:

the structure of these three tables are as below:
table A: a_id, name, date
table B: b_id, a_id, message
table C: c_id, b_id, position
what I want to know is how to use C# to delete one row in table A and delete related rows in table B and C at the same time?

Must I delete related rows in other tables one by one? or is it C# supports procedure like Sql Server to achieve this action and how?

thanks for help........

[560 byte] By [DEVILKing] at [2007-12-16]
# 1
I think you may eneble cascade delete in the relation properties and this will do the job either you no matter what executes the delete .
Otherwise you have to delete the related rows manually i.e. you will get the ID you want to delete from table_A then you get the related ID's from tablee_B then DELETE their related ID's from table_C the delete those rows of table_B then delete the ID of table_A
.... the cascade delete is too much easier and independent of the application
Eisa at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 2
thanks Eisa, could you give me more details about how to set the properties that enable cascade delete? I don't want to do it manually, because I got more than 10 tables and they are all related.
DEVILKing at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified