Closed Zumpel96 closed 1 year ago
This issue is lacking enough information for us to be able to fully understand what is happening. Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate.
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.
Ask a question
I have the problem, that I always get a foreign key conflict on my Azure hosted SQL DB. The thing I noticed is, that even though my foreign key is NULL, it is automatically set to 0, when adding or updating the object. This then results in the conflict, since the object with ID 0 cannot be found in the foreign table.
Include your code
I even tried to force the ID of the foreign key to be NULL, without any difference.
Include stack traces
Include provider and version information
EF Core version: Microsoft.EntityFrameworkCore/6.0.1 Database provider: Microsoft.EntityFrameworkCore.SqlServer Target framework: .NET 6.0 Operating system: Windows 10.0.19044 IDE: Rider 2021.3.3