예제 #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);
        }
예제 #2
0
        public string Handle(CreateToDo cmd)
        {
            var e = new ToDoCreated {
                Subject = cmd.Subject
            };

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