© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3mo ago•
9 replies
hutonahill

✅ EFCore Tables with inharitance

Working on a library that will handle manage a game back end. I don't want to define a strict data storage method, But i do need some control over how data is stored.

The solution i came up with was a set of abstract classes that work similar to EFCore.

However i am struggling to make this solution work. EFCore wants to make a discriminated table, where it stores both the parent and the child's data, but i only need the child's data. the parents are only there to store the shape and a bunch of validation code.

I created a version of
[NotMapped]
[NotMapped]
that didn't inherit so it wouldn't do that but now i am getting errors that say the Game table don't exist when i can see it does in an online viewer.

I am trying a bunch of combination of settings and decorators, but when i call
context.Games...
context.Games...
it throws an error saying games dosnt exist.

Please Help!
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

✅ Add tables in a project with EFCore
C#CC# / help
3y ago
Issues with EFCore
C#CC# / help
3y ago
Using MongoDB EFCore with HotChocolate
C#CC# / help
9mo ago
✅ Efcore help with 2 databases
C#CC# / help
3y ago