Exemple #1
0
 public IEntityVariantSetup GetEntityVariant(string?alias)
 {
     if (string.IsNullOrWhiteSpace(alias) || SubEntityVariants == null || EntityVariant.Alias == alias)
     {
         return(EntityVariant);
     }
     else
     {
         return(SubEntityVariants.FirstOrDefault(x => x.Alias == alias) ?? throw new InvalidOperationException($"Entity variant with alias {alias} does not exist."));
     }
 }
Exemple #2
0
 internal EntityVariant GetEntityVariant(string?alias)
 {
     if (string.IsNullOrWhiteSpace(alias) || SubEntityVariants == null)
     {
         return(EntityVariant);
     }
     else
     {
         return(SubEntityVariants.First(x => x.Alias == alias));
     }
 }
 public IEntityVariantSetup GetEntityVariant(string?alias)
 {
     if (string.IsNullOrWhiteSpace(alias) || SubEntityVariants == null || EntityVariant.Alias == alias)
     {
         return(EntityVariant);
     }
     else
     {
         return(SubEntityVariants.First(x => x.Alias == alias));
     }
 }
Exemple #4
0
 public IEntityVariantSetup GetEntityVariant(IEntity entity)
 {
     return(SubEntityVariants?.FirstOrDefault(x => x.Type == entity.GetType())
            ?? EntityVariant);
 }
Exemple #5
0
 internal EntityVariant GetEntityVariant(IEntity entity)
 {
     return(SubEntityVariants?.FirstOrDefault(x => x.Type == entity.GetType())
            ?? EntityVariant);
 }