Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section 4 - Assignment Solution #1

Open
Aura74 opened this issue Sep 21, 2020 · 3 comments
Open

Section 4 - Assignment Solution #1

Aura74 opened this issue Sep 21, 2020 · 3 comments

Comments

@Aura74
Copy link

Aura74 commented Sep 21, 2020

HI,
I get an error, I have tried to code along the whole courser from start to here twice and its always the same error when i try to update the database:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Product_ApplicationType_ApplicationTypeId".
The conflict occurred in database "Rocky", table "dbo.ApplicationType", column 'Id'.

Failed executing DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE [Product] ADD CONSTRAINT [FK_Product_ApplicationType_ApplicationTypeId] FOREIGN KEY
([ApplicationTypeId]) REFERENCES [ApplicationType] ([Id]) ON DELETE CASCADE;

@Mosaibah
Copy link

Mosaibah commented Nov 9, 2021

me too, the same error

@brianbartels
Copy link

I'm getting the same error message as well.

@efem553
Copy link

efem553 commented Mar 16, 2022

Hi everyone, u need to delete data from table(Product). As i read from forums, the problem is we added records to table with null application types. This causing the problem. Delete records from Product after than try the run 'update-database' command from command console :) It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants