Exemplo n.º 1
0
        // GET api/parent/5
        public ParentApiModel Get(int id)
        {
            ParentApiModel parent = new ParentApiModel();

            parent.get(id);
            return(parent);
        }
Exemplo n.º 2
0
        // GET api/parent
        public List <ParentApiModel> Get()
        {
            List <ParentApiModel> Parents = new List <ParentApiModel>();
            ParentApiModel        p1      = new ParentApiModel();
            DataTable             dt      = p1.getList();

            foreach (DataRow dr in dt.Rows)
            {
                ParentApiModel p = new ParentApiModel();
                p.get(Convert.ToInt32(dr["ID"]));
                Parents.Add(p);
            }
            return(Parents);
        }