Exemplo n.º 1
0
 public static EntityVariant ToEntityVariant(this EntityVariantConfig variant)
 {
     return(new EntityVariant
     {
         Alias = variant.Type.FullName?.ToUrlFriendlyString() ?? throw new InvalidOperationException("The Type of an EntityVariant should have a FullName"),
         Icon = variant.Icon,
         Name = variant.Name,
         Type = variant.Type
     });
 public static EntityVariant ToEntityVariant(this EntityVariantConfig variant)
 {
     return(new EntityVariant
     {
         // TODO: is this guid going to work properly?
         Alias = variant.Type.FullName?.ToUrlFriendlyString() ?? Guid.NewGuid().ToString(),
         Icon = variant.Icon,
         Name = variant.Name,
         Type = variant.Type
     });
 }