Ejemplo n.º 1
0
            public ProjectionResult(TProjection result)
            {
                Assert(result != null);

                Result   = result;
                ResultId = DataPropertyHelper.GetId <TProjectionId, TProjection>(result);
            }
Ejemplo n.º 2
0
        private static string GetId(T aggregate)
        {
            if (typeof(T).IsAssignableFrom(typeof(AggregateRootBase)))
            {
                return((aggregate as AggregateRootBase)?.Id);
            }

            if (aggregate == null)
            {
                return(null);
            }

            return(DataPropertyHelper.GetId(typeof(T), aggregate).ToString());
        }