locked
Dynamic Entity Creation RRS feed

  • Question

  • User-209733587 posted

    Can I use dynamic entity at this framework?

    I do not want to restart application if i add new entity to my project, i can add new entities and new columns to project ,

    can i set entity values like this syntax entity["name"].value = myValue at runtime,

     

    thanks

    Thursday, December 25, 2008 10:49 AM

Answers

  • User1641955678 posted

    Actually, modifying the model dynamically is not likely to be supported, because Linq To Sql and Entity Framework rely on strongly typed CLR objects for the entity types.  What can be achieved dynamically is modifying the metadata, but that's a different thing.

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 27, 2008 2:29 PM

All replies

  • User-330204900 posted

    No sorry not at the moment; although I believe there are plans to make it so that the model can be modified at runtime. Whether that will be in the next release or some future I don't know.

    Thursday, December 25, 2008 7:18 PM
  • User1641955678 posted

    Actually, modifying the model dynamically is not likely to be supported, because Linq To Sql and Entity Framework rely on strongly typed CLR objects for the entity types.  What can be achieved dynamically is modifying the metadata, but that's a different thing.

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 27, 2008 2:29 PM