Ejemplo n.º 1
0
        public PokemonModel LoadCasual(PokemonModel request = null)
        {
            PokemonModel model = new PokemonModel();

            string query = "select * from stats " + (request.GetPropertyOrDefault(x => x.Query) ?? "");

            try
            {
                List <Stat> statList = DataFactory.RunSelectQuery <Stat>(query);

                model.StatList = statList;
            }
            catch (Exception e)
            {
                model.StatList          = new List <Stat>();
                model.ErrorExecutingSql = true;
            }

            return(model);
        }