using Model; using System.Collections.Immutable; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace EFlib { public class EFChampion { /**** Only Attributs ****/ [Key] [MaxLength(256)] public string Name { get; set; } [MaxLength(500)] public string Bio { get; set; } public string Icon { get; set; } public List> CharacteristicsList { get; set; } public ReadOnlyDictionary Characteristics => new ReadOnlyDictionary(CharacteristicsList.ToDictionary(kv => kv.Key, kv => kv.Value)); [Required] public ChampionClass Class { get; set; } public ReadOnlyCollection Skins { get; private set; } public ImmutableHashSet Skills { get; private set; } [ForeignKey("ImageId")] public EFLargeImage Image { get; set; } } }