Exemple #1
0
 internal static void CheckItem <TRelatedEntity>(this EntityUnique <TRelatedEntity> EntityUnique, TRelatedEntity RelatedEntity) where TRelatedEntity : Entity <TRelatedEntity>
 {
     if (EntityUnique.Entity != RelatedEntity)
     {
         EntityUnique.ThrowEntityUniqueException($"Expect Item Be {RelatedEntity}");
     }
 }
Exemple #2
0
 private static void ThrowEntityUniqueException <TRelatedEntity>(this EntityUnique <TRelatedEntity> EntityUnique, string Message) where TRelatedEntity : Entity <TRelatedEntity>
 {
     throw new NotExpectedResultException($"{EntityUnique}, {Message}");
 }