C
C#3mo ago
flirtiest

Synchronizing 2 tables's ID between eachother using EntityFramework Core

Hello, I don't know if someone here is proficient with EntityFramework Core, but I've got a question about if sharing an id between tables is possible. Lets say I got a table EmployeeTickets and a table CustomersTickets. Both table have a Id field, but that id field is like a primary key for both tables. Eg: If EmployeeTickets have a row with Id 1, If I insert something in CustomersTicket, the Id must be 2, and not 1. Does EntityFramework provide a way to handle that kind of stuff, or do I need to do it manually
3 Replies
ACiDCA7
ACiDCA73mo ago
havent tried it but it should work with sequences on second read it i think if you would roll better with another database structure
flirtiest
flirtiest3mo ago
Unfortunately I cannot change the database structure with this project, Its definetly something we would be looking for in the future
ACiDCA7
ACiDCA73mo ago
well then, good luck with sequences