Commit 02760fc
Fix null check in refactored Persist methods
Added null checks for entity/viewmodel parameters before accessing their Id property in the Persist methods. This fixes test failures where ArgumentNullException was expected but NullReferenceException was thrown instead.
Fixes:
- EfEntityStore.Persist: Added null check before calling PersistCore
- EfViewModelStore.Persist: Added null check before calling PersistCore
Test Results:
- All 129 tests now pass (92 Core + 37 EF)
- Fixed: Persist_NullEntity_ThrowsArgumentNullException
- Fixed: Persist_NullViewModel_ThrowsArgumentNullException
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent cc222ae commit 02760fc
File tree
2 files changed
+6
-0
lines changed- src/SourceFlow.Net.EntityFramework/Stores
2 files changed
+6
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
0 commit comments