How to get Referential Integrity from your model automatically? RRS feed

  • Question

  • User-326746839 posted


    You can get a lot of customization from your MetaData file. You can also include filtering and cascading by combining some clauses in that same MetaData file plus some Steve Naughton's cadcading libraries ...

    BUT ... How can you get the whole set of Referential Integrity rules from your own ORM (.edmx file) directly from your project model .... automatically?

    ... can a good part of it (if not all) be done automataically from your own database model (ORM) via T4 or some other code generator?

    I ask this because writing cascading MetaData directives can be a little cumbersome the way Naughton's model establishes and also taht it is really difficult to achieve cascading when one of the entities you need to "cascade" or "filter" has many different "cascading entities"  pointing to it?


    As can be partially seen in this example, any of the foreign keys (FK) can be a "cascading" one ... any of them !!!

    Carlos N. Porras
    (El Slavador)

    Sunday, January 26, 2014 9:56 AM

All replies

  • User-330204900 posted

    Hi Carlos I have two different Cascading examples now and both work with any depth of cascade, these will be availbe in my open source project soon.

    Monday, January 27, 2014 4:03 AM
  • User-326746839 posted

    Hi Steve,

    Will you do me the favor of providing me the links to these files, please .... ?

    Carlos N. Porras
    (El Salvador)

    Tuesday, January 28, 2014 1:07 AM
  • User-330204900 posted

    Drop me an e-mail and I will try and get the latest bit together for you

    Tuesday, January 28, 2014 5:01 AM