Data insertions without my request EF6

Skernel 1 Reputation point
2021-03-16T08:58:45.467+00:00

My project was created on VS17, it is on the 4.6.1 framework. I use Entity Framework 6 in database first. We switched to VS19 and this is the first time I debugged the project on it.

My pc crashed and showed me a blue screen while I was debugging.
When I restarted the project I noticed that the list I had loaded during the debugging with EF6, and displayed in a datagrid, was reinserted (duplicated) in the database with new id. For each inserted item, the related objects were also duplicated in cascade with new ids, as if the entities were no longer tracked by Entity.
However, to query the database I have to instantiate a new data service and use its methods. No method has been developed to insert or modify all a list. The modification or insertion of my data is only done by selecting an id or an entity.
I don't understand how EF6 has done to insert these items, is it possible that it is because of VS19? An incompatibility with the framework or Entity? Is there a link with the blue screen?

Thanks for your answers.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,575 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
786 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Skernel 1 Reputation point
    2021-03-22T07:38:31.813+00:00

    Hello,
    I can't tell you if the update fixed the problem, since then it hasn't appeared and I haven't managed to reproduce it. I will come back to you if it happens again.
    Thank you for your answers.

    0 comments No comments