public List <CharacterAffliction> GetCharacterStages(int characterID, int afflictionID) { var stages = CharacterAfflictions.Where(c => c.CharacterID == characterID).ToList(); stages = stages.Where(c => c.AfflictionID == afflictionID).ToList(); if (!stages.Any()) { //stages = GetDefaultStages(afflictionID); } return(stages.OrderBy(s => s.Stage).ToList()); }
public List <CharacterAffliction> GetDefaultStages(int afflictionID) { return(CharacterAfflictions.Where(c => c.AfflictionID == afflictionID).ToList()); }
public CharacterAffliction GetCharacterStage(int characterAfflictionID) { return(CharacterAfflictions.Where(a => a.CharacterAfflictionID == characterAfflictionID).FirstOrDefault()); }