public TodoListItem CreateListItem(Guid id, string name, string notes, DateTime?dueDate, bool important) { var todoItem = new TodoListItem() { ListId = this.Id, Id = id, Name = name, Notes = notes, DueDate = dueDate, Important = important }; DomainEvents.Add(new TodoListItemCreated { Item = todoItem, List = this }); return(todoItem); }
public void EditItem(TodoListItem item) { DomainEvents.Add(new ItemChanged { Item = item }); }