0
I would like to know how to manipulate the Unique Keys and Primary Keys with Entity Framework. Whenever I try to edit an attribute and pass the same value it had before, it returns me an error:
"The instance of Entity type 'Unit' cannot be tracked because Another instance with the same key value for {'Idunidade'} is already being tracked. When Attaching existing entities, ensure that only one Entity instance with a Given key value is Attached. Consider using 'Dbcontextoptionsbuilder.Enablesensitivedatalogging' to see the Conflicting key values."
If I try to pass nothing, the value is blank, which is also incorrect. As I should do?
But I’m trying to update the same record with the same value...
– Snyp