Пример #1
0
 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);
 }
Пример #2
0
 public static bool IsValid(EntityStringId <TAggregateRootId> entityId)
 {
     return((!ReferenceEquals(null, entityId)) && string.IsNullOrWhiteSpace(entityId.Id) == false);
 }