locked
Why throw a exception of InvalidOprationException when I register two MetaModels to same a database? RRS feed

  • Question

  • User745141034 posted

    Why throw a  exception of InvalidOprationException when I register two MetaModels to same a database?Because one MetaModel for web site,the other for web api.

    Friday, May 13, 2016 9:00 AM

Answers

  • User-330204900 posted

    P.S. when I think back to the multiple metaModels I have registered of the same database they have always been different models, this may be a limitation of the MetaModel only a single reference to a data model?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 16, 2016 1:51 PM

All replies

  • User1009646345 posted

    can you provide some related code about the issue.

    Monday, May 16, 2016 11:35 AM
  • User-330204900 posted

    You need to save the MetaModel to a separate variable for each different model even if they are for the same DB. Please post the code for how you are registering them.

    Monday, May 16, 2016 12:37 PM
  • User-330204900 posted

    P.S. when I think back to the multiple metaModels I have registered of the same database they have always been different models, this may be a limitation of the MetaModel only a single reference to a data model?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 16, 2016 1:51 PM