timabell / ef-enum-to-lookup

Generates lookup tables from enum references in Microsoft Entity Framework 6.1
https://www.nuget.org/packages/ef-enum-to-lookup
69 stars 29 forks source link

The MERGE statement attempted to UPDATE or DELETE the same row more than once. #54

Open attrib75 opened 8 years ago

attrib75 commented 8 years ago

I'm getting this when I call numToLookup.Apply(context); in my seed method

timabell commented 8 years ago

I have no idea how that could happen. Could you supply some steps to reproduce the problem please. Preferably in the form of an additional unit test for the project. Thanks.

attrib75 commented 8 years ago

It happens during an EF update-database. In the seed method I'm calling var enumToLookup = new EnumToLookup();
enumToLookup.Apply(context);

timabell commented 8 years ago

Nothing wrong with what you've said there, must be something in your specific dbcontext or database, I'd be interest to know what.