public static List<Student> GetAllStudent()
        {
            string sqlAll = "select * from student";
            return GetStudentBySql(sqlAll);
        }        public static List<Student> GetStudentBySql(string safeSql)
        {
            List<Student> list = new List<Student>();
            DataTable table = DB.GetDataSet(safeSql);
            foreach (DataRow row in table.Rows)
            {
                Student st = new Student();
                st.Id = (int)row["id"];
                st.Uname = (string)row["uname"];
                st.Sex = (int)row["sex"];
                list.Add(st);
            }
            return list;
        }
为什么将一个方法分离出来写这个是DAL层的
如果像它所说的为了安全那么到底安全在哪儿那
谢谢了