public EntityStringId(EntityStringId <TAggregateRootId> idBase, string entityId) : base(idBase.RootId, entityId) { if (!IsValid(idBase)) { throw new ArgumentException("Empty string is not allowed.", nameof(idBase)); } Id = idBase.Id; RawId = setRawId(Urn); }
public static bool IsValid(EntityStringId <TAggregateRootId> entityId) { return((!ReferenceEquals(null, entityId)) && string.IsNullOrWhiteSpace(entityId.Id) == false); }