5d4f0c37458c78c3db7bbba216a09fa5ede9caff
Same two classes of bug as PrebuiltDeckEditor: 1. AddAsset / AddAnimation — ValueGeneratedOnAdd sentinel mismatch: New entities with Id = Guid.NewGuid() added to a tracked ObservableHashSet are classified as Modified by EF, causing a 0-rows-affected UPDATE. Fix: Db.Entry(entry).State = EntityState.Added when !_isNew. 2. RemoveAsset / RemoveAnimation — redundant Db.Remove on detached entity: Id != Guid.Empty is always true (Guid.NewGuid() default). Removing an Added entity from the collection detaches it; calling Db.Remove re-attaches it as Deleted → DELETE on a non-existent row → DbUpdateConcurrencyException. Fix: removed the explicit Db.Remove calls; EF handles orphan deletion. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Description
No description provided
53 MiB
Languages
C#
52.7%
HTML
24.9%
GDScript
21.2%
CSS
0.8%
Python
0.3%
Other
0.1%