© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
4y ago
•
2 replies
Bobby Bob
Entity Framework SQL Error 19 - Foreign Key Constraint Failed
I
've described the problem in significant detail here
:
https://stackoverflow.com/questions/74162855/entity-framework-sql-error-19-foreign-key-constraint-failed
Not sure why I am getting the error I am getting
. If you guys want to replicate the error
, you should change the connection string
Data Source =
Data Source =
to your respective path of where the database
CoffeeShop.db
CoffeeShop.db
is in
Stack Overflow
Entity Framework SQL Error 19: 'Foreign KEY constraint failed'
Github Repo
:
https://github.com/blueboy90780/Coffee-POS-System/tree/master
I have small console application using
.NET 6 and EF Core 6
.0 with an SQLite database
. When running my code I get the foll
.
.
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Entity Framework Foreign Key
C
C# / help
2y ago
Foreign Key | Entity Framework
C
C# / help
2y ago
Entity Framework Core 8 -Foreign Key Constraint failure.
C
C# / help
2y ago
Entity Framework Foreign Key restraint
C
C# / help
16mo ago