© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
26 replies
REAL STUNNA

❔ Adding database entries with EF Core

I'm completely new to EF Core. I have two tables, Contact and Number. The two tables are connected through FK ContactId in the Number table. I want to create an entry but not sure how I would be able to add information to both tables, here is the pastebin:

https://paste.mod.gg/cilvbumgkbvh/0

(Also, does anyone know how to make a field a foreign key after i've done the add-migration and update-database?)
BlazeBin - cilvbumgkbvh
A tool for sharing your source code with the world!
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

✅ Adding EF Core Migration Error
C#CC# / help
4y ago
EF Core
C#CC# / help
2y ago
❔ EF Core Adding "1" to Column Name
C#CC# / help
3y ago
❔ Error adding new model in EF Core
C#CC# / help
3y ago