How can we debug with InMemoryDatabase and how can we know exactly the key is duplicate?

Kha Vo 0 Reputation points
2024-04-10T08:27:15.02+00:00

How can we debug with InMemoryDatabase Unit test?

Also I have question that when I get this error for example "An item with the same key has already been added. Key: 16c568e8-b00d-46b2-ab27-cdb7685839ae" why VS don't point exactly what entity is duplicate key? I can't also in Callstack

Or another example that when we get error "Null Reference Objection. Object reference not set to an instance of an object" I don't see what exactly object is null.

Should we have the new update for VS of this point? It will help developer saving time and more convenience while working.

Thanks.

User's image

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,178 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,618 questions
{count} votes