public static LammyList RetrieveLammiesForCharacterID(int characterid) { LammyList myLammyList = new LammyList(); myLammyList.ParentCharacterID = characterid; foreach (characterlammy lammyLink in characterlammy.All().Where(x => x.characterid == characterid)) { myLammyList.List.Add(Lammy.GetLammyByID(lammyLink.lammyid)); } return(myLammyList); }
public static Character GetCharacterByID(int characterid) { character dbCharacter = character.All().FirstOrDefault(x => x.id == characterid); if (dbCharacter != null) { Character myCharacter = MakeCharacterFromDBCharacter(dbCharacter); myCharacter.Feats.SetFeatList(FeatList.RetrieveFeatsForCharacter(characterid)); myCharacter.Lammies.SetLammyList(LammyList.RetrieveLammiesForCharacterID(characterid)); return(myCharacter); } else { return(null); } }
public void SetLammyList(LammyList myList) { _lammies = myList.List; }
public Character() { _lammies = new LammyList(); _feats = new FeatList(); }