Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. ADO.NET Entity Framework and create entities at runntime

ADO.NET Entity Framework and create entities at runntime

Scheduled Pinned Locked Moved Database
questioncsharpdatabasedesign
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    realmontanakid
    wrote on last edited by
    #1

    Hi, I'm currently working with the ADO.NET Entity Framework. The database design gots a anomaly with its tables. The application design is a little bit awful. The user can login with different companies. So, USER1 logged in on company one, USER2 on company two and so on. For each company exists a copy of each table which can be identified via a prefix. If USER1 is logged in on company one his working tables got the prefix XXA_TableName. If USER2 is logged in on company two his working tables got the prefix XXB_TableName and so on. You don't have to tell me that this is a very dirty database design because i know that (it was not my brainchild). What i need is to create entities at runtime because on design time i don't know on which company the user will log in. If the user log in on company one i have to create an entity for the table XXA_TableName. I hope this is coherent... So, how can i create entities on runtime with the ADO.NET Entity Framework? Kind regards realmontanakid

    P 1 Reply Last reply
    0
    • R realmontanakid

      Hi, I'm currently working with the ADO.NET Entity Framework. The database design gots a anomaly with its tables. The application design is a little bit awful. The user can login with different companies. So, USER1 logged in on company one, USER2 on company two and so on. For each company exists a copy of each table which can be identified via a prefix. If USER1 is logged in on company one his working tables got the prefix XXA_TableName. If USER2 is logged in on company two his working tables got the prefix XXB_TableName and so on. You don't have to tell me that this is a very dirty database design because i know that (it was not my brainchild). What i need is to create entities at runtime because on design time i don't know on which company the user will log in. If the user log in on company one i have to create an entity for the table XXA_TableName. I hope this is coherent... So, how can i create entities on runtime with the ADO.NET Entity Framework? Kind regards realmontanakid

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Sounds like the person who created the database does not know how to normalize it. You might want to suggest they do that.

      "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

      R 1 Reply Last reply
      0
      • P Paul Conrad

        Sounds like the person who created the database does not know how to normalize it. You might want to suggest they do that.

        "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

        R Offline
        R Offline
        realmontanakid
        wrote on last edited by
        #3

        Hi, thank u for your reply. Some things can't be changed at this time. However, is there an answer to my question? Kind regards

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups