Example #1
0
        public EventId Handle(CreateToDo cmd)
        {
            var e = new ToDoCreated {
                Subject = cmd.Subject
            };

            _es.Record(null, e); //expectedLastEventId can be null because this is a single user and single thread app
            return(e.Id);
        }
Example #2
0
        public string Handle(CreateToDo cmd)
        {
            var e = new ToDoCreated {
                Subject = cmd.Subject
            };

            _es.Record(e);
            return(e.Id);
        }