Interface ITodoRepository¶
Namespace: MyApp.Domain
Assembly: MyApp.Domain.dll
Persistence contract for todo items.
Remarks¶
The contract lives in the domain layer so that application services can depend on it without referencing any concrete infrastructure.
Methods¶
Add(TodoItem)¶
Adds a new todo item to the store.
Parameters¶
item TodoItem
The item to add.
Find(Guid)¶
Returns the todo item with the given identifier, if present.
Parameters¶
id Guid
The identifier to look up.
Returns¶
The matching item, or null when no item exists.
GetAll()¶
Returns all todo items currently in the store.
Returns¶
An ordered, read-only view of every stored item.
Remove(Guid)¶
Removes the todo item with the given identifier from the store.
Parameters¶
id Guid
The identifier of the item to remove.
Returns¶
true when an item was removed; otherwise false.
Update(TodoItem)¶
Replaces a stored todo item with an updated copy.
Parameters¶
item TodoItem
The item to update; identified by