ADO.NET Entity Framework and create entities at runntime
-
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
-
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
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
-
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
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