none
Database schemas versus .Net namespaces question RRS feed

  • Question

  • Hi everybody,

    In fact, I got confused a little bit when I was trying to use two table with the same name which belong to different database schemas in the entity framework; I was obliged to change the entity name for one of them instead of  changing the namespace of the auto generated entity class, so the question is: Is there a possible way to change the namespace of the entity class to avoid naming confliction?

    Hoping for prompt response,

    Cheers

      





    • Edited by Imad Ozone Wednesday, March 7, 2012 10:03 AM
    Tuesday, March 6, 2012 5:15 AM

Answers

  • Hello Imad,

    Unfortunately EF doesn't support entity classes with the same name in different namespaces yet. So even if you manage to generate them in some way, when used EF will throw an exception.

    • Marked as answer by Imad Ozone Wednesday, March 7, 2012 10:02 AM
    Tuesday, March 6, 2012 6:59 PM