示例#1
0
        public static DigimonTemp Down(DigimonTemp temp, List <DigimonTemp> list)
        {
            var down = DataBase.DBStatic.Digivolves.FirstOrDefault(x => x.DigimonToId == temp.NameEng);

            if (down == null)
            {
                throw new ApplicationException();
            }
            var digimonTemp = list.FirstOrDefault(x => x.NameEng == down.DigimonFromId);

            if (digimonTemp == null)
            {
                throw new ApplicationException();
            }
            return(digimonTemp);
        }
示例#2
0
 public static DigimonTemp Down(DigimonTemp temp, List<DigimonTemp> list)
 {
     var down = DataBase.DBStatic.Digivolves.FirstOrDefault(x => x.DigimonToId == temp.NameEng);
     if (down == null)
         throw new ApplicationException();
     var digimonTemp = list.FirstOrDefault(x => x.NameEng == down.DigimonFromId);
     if (digimonTemp == null)
         throw new ApplicationException();
     return digimonTemp;
 }