コード例 #1
0
        /// <summary>
        /// Gets the entity.
        /// </summary>
        /// <param name="id">The id.</param>
        public virtual void GetEntity(TId id)
        {
            var aggregateRoot = _factory.GetById(id);

            if (aggregateRoot != null)
            {
                OnActionStateNotification(aggregateRoot.State, aggregateRoot.Root);
            }
            else
            {
                OnEnityNotExistNotification(id);
            }
        }
コード例 #2
0
        /// <summary>
        /// Gets the intermediate events.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="finalState">The final state.</param>
        /// <returns></returns>
        public IEnumerable <Type> GetIntermediateEvents(TId id, string finalState)
        {
            var aggregateRoot = Factory.GetById(id);

            return(aggregateRoot != null?aggregateRoot.GetIntermediateEvents(finalState) : null);
        }