© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
4 replies
Samophobia

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
EmployeeTickets
and a table
CustomersTickets
CustomersTickets
. Both table have a
Id
Id
field, but that id field is like a primary key for both tables. Eg: If
EmployeeTickets
EmployeeTickets
have a row with Id 1, If I insert something in
CustomersTicket
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Need help in EntityFramework core
C#CC# / help
3y ago
❔ Selecting child tables using EF Core
C#CC# / help
3y ago
Synchronizing with Monitor
C#CC# / help
2y ago