示例#1
0
        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);
        }
示例#2
0
 public void EditItem(TodoListItem item)
 {
     DomainEvents.Add(new ItemChanged {
         Item = item
     });
 }