|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.Immutable;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using System.Linq;
|
|
|
|
@ -17,9 +18,19 @@ namespace EntityFramework
|
|
|
|
|
public string name { get; set; }
|
|
|
|
|
public ChampionClass Class { get; set; }
|
|
|
|
|
|
|
|
|
|
public ImmutableHashSet<Skill> Skills => skills.ToImmutableHashSet();
|
|
|
|
|
private HashSet<Skill> skills = new HashSet<Skill>();
|
|
|
|
|
|
|
|
|
|
public ChampionEntity(string name) {
|
|
|
|
|
this.name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool AddSkill(Skill skill)
|
|
|
|
|
=> skills.Add(skill);
|
|
|
|
|
|
|
|
|
|
public bool RemoveSkill(Skill skill)
|
|
|
|
|
=> skills.Remove(skill);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|