Todo repository protocol #8
@@ -0,0 +1,8 @@
|
|||||||
|
import SwiftData
|
||||||
|
|
||||||
|
/// Extends ModelContext to conform to the Repository protocol.
|
||||||
|
///
|
||||||
|
/// This extension allows ModelContext from SwiftData to be used as a repository,
|
||||||
|
/// enabling dependency injection and facilitating unit testing by allowing mock
|
||||||
|
/// repositories to be substituted during tests.
|
||||||
|
extension ModelContext: Repository {}
|
||||||
Reference in New Issue
Block a user