Пример #1
0
        public static QueryResult <List <Person> > GetAll()
        {
            var response = new QueryResult <List <Person> >();

            try
            {
                response.Data = PersonDAO.GetAll();
            }
            catch (Exception ex)
            {
                HandleError(response, ex);
            }

            return(response);
        }
Пример #2
0
        public ActionResult <List <Person> > GetAll()
        {
            PersonDAO personDAO = new PersonDAO(_connection);

            return(personDAO.GetAll().ToList());
        }