/*public List<Categorias> obtenerCategoriasAdminVideojuego()
     * {
     *  List<Categorias> lista = new Mapeo().cat.ToList();
     *  Categorias categorias = new Categorias();
     *  categorias.Id_categoria = 0;
     *  categorias.Categoria = "--Seleccione--";
     *  lista.Add(categorias);
     *  //return new Mapeo().videojuego.OrderBy(x => x.Nom_juego).ToList<Videojuego>();
     *  return new Mapeo().cat.OrderBy(x => x.Id_categoria).ToList<Categorias>();
     *
     * } */

    public List <Categorias> obtenerCategorias()
    {
        List <Categorias> lista      = new Mapeo().cat.ToList();
        Categorias        categorias = new Categorias();

        categorias.Id_categoria = 0;
        categorias.Categoria    = "--Seleccione--";
        lista.Add(categorias);
        return(lista.OrderBy(x => x.Id_categoria).ToList());
    }
Esempio n. 2
0
    public List <Plataforma> obtenerPlataforma()
    {
        List <Plataforma> lista      = new Mapeo().plat.ToList();
        Plataforma        plataforma = new Plataforma();

        plataforma.Id_plataforma   = 0;
        plataforma.PlataformaJuego = "--Seleccione--";
        lista.Add(plataforma);
        return(lista.OrderBy(x => x.Id_plataforma).ToList());
    }