public ProjectionResult(TProjection result) { Assert(result != null); Result = result; ResultId = DataPropertyHelper.GetId <TProjectionId, TProjection>(result); }
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()); }