Exemplo n.º 1
0
        //desplegar por id
        public Area ObtenerAreaById(int IDArea)
        {
            DatoArea datArea = new DatoArea();
            //dos formas de hacerlo
            //LINQ
            Area aut = new Area();
            aut = (from l in datArea.select_All_Area()
                   where l.IDArea == IDArea
                   select l).FirstOrDefault();

            return aut;
            //por medio del procedimiento almacenado
            //return datAuto.select_AutosbyId(IDAuto);
        }
Exemplo n.º 2
0
 //desplegr todos
 public List<Area> ObtenerArea()
 {
     DatoArea datArea = new DatoArea();
     return datArea.select_All_Area();
 }