locked
Does dynamic data enforce RI and use transactions? RRS feed

  • Question

  • User-109909000 posted

    For example:

    You have a groups table and a users table. Users belong to a group via a foreign key.

    If you delete a group, you also might want to delete all the users in that group - does dynamic data take care of that for you?

    When inserting new data, does it use transactions so that its all or nothing if there is an error?

     

    Thursday, September 4, 2008 4:50 AM

Answers

  • User-330204900 posted

    This is realy a Linq to SQL or Linq to Entities question as the provider underlying DynamicData is where this occurs.

    I know that you if you turn Cascading Deletes on (by adding ON DELETE CASCADE to the constraint on you tables relationships) in your database then Linq to SQL will do the cascading delete, see this early Linq to SQL video by Mike Taulty on Deletes with LINQ to SQL

    You could force tranaction in Linq to SQL see this video also by Mike Taulty Transactions in LINQ to SQL

    Hope this helps [:D]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 4, 2008 11:23 AM

All replies

  • User-330204900 posted

    This is realy a Linq to SQL or Linq to Entities question as the provider underlying DynamicData is where this occurs.

    I know that you if you turn Cascading Deletes on (by adding ON DELETE CASCADE to the constraint on you tables relationships) in your database then Linq to SQL will do the cascading delete, see this early Linq to SQL video by Mike Taulty on Deletes with LINQ to SQL

    You could force tranaction in Linq to SQL see this video also by Mike Taulty Transactions in LINQ to SQL

    Hope this helps [:D]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 4, 2008 11:23 AM
  • User-109909000 posted

     Great reply, that pretty much answered my questions!

    Friday, September 5, 2008 7:19 AM