Prev: .NET Web application
Next: Managed type use in MFC App
From: r norman on 31 Mar 2010 11:12 Is there some way in .NET (3.5) to specify that my SQL server foreign links should use declarative referential integrity ("ON DELETE CASCADE")? My application is developed in C# for .NET 3.5 using LINQ to SQL where my database tables are linked with foreign key associations. The database is designed using the LINQ to SQL graphics designer (dbml). The "Edit Association" properties in the database designer do not seem to include foreign key constraints. Do I have to write specific code for each foreign key using T_SQL to "ALTER TABLE .. ADD CONSTRAINT"? If so, is there an easy way to cycle through each table in the database and find the foreign keys programmatically?
|
Pages: 1 Prev: .NET Web application Next: Managed type use in MFC App |