How to create multiple table references to one table - Entity framework

asp.net c# database entity-framework-6 sql-server

Question

enter image description here

As shown in the figure, we have a need that several tables must be referenced to in a single table.

Please be aware that the design only serves to illustrate our requirements and is NOT the true DB model. Could you provide advice on how to accomplish the aforementioned in aSQL Server DB andEntity Framework 6 ?

Example: Multiple files may be uploaded to a sales order (in the SalesOrder database), and the information of those uploaded files are maintained in the UploadedFile table. The same applies to OrderTable and Invoice.

Therefore, a good database schema with FK links between the FileUpload table and all other associated tables is required.

Note: All tables' PKs are auto-increment int values, and further entities (tables) may be required in the future.

1
3
10/23/2018 3:33:01 PM

Popular Answer

ZZZ_tmp
2
10/23/2018 4:16:33 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow