You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cases where the object has a property named ID, the property will automatically be assigned as [Key], even if [Computed] is added manually in an attempt to override it. This can cause confusion, this exception will be thrown despite the code looking fine and there only being one [ExplicitKey] defined. I've added this extra line of information to help diagnosis.
thrownewDataException($"{method}<T> only supports an entity with a single [Key] or [ExplicitKey] property");
156
+
thrownewDataException($"{method}<T> only supports an entity with a single [Key] or [ExplicitKey] property. [Key] Count: {keys.Count}, [ExplicitKey] Count: {explicitKeys.Count}");
157
157
if(keyCount==0)
158
158
thrownewDataException($"{method}<T> only supports an entity with a [Key] or an [ExplicitKey] property");
0 commit comments