Esempio n. 1
0
        public JsonResult GetAll()
        {
            StudentDAL dal  = new StudentDAL();
            var        list = dal.GetAll();

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
 public static List <Student> GetAll()
 {
     using (StudentDAL studentDAL = new StudentDAL())
     {
         return(studentDAL.GetAll());
     }
 }
Esempio n. 3
0
        public IQueryable <Student> GetAll()
        {
            StudentDAL           dalObject = new StudentDAL();
            IQueryable <Student> results   = dalObject.GetAll();

            return(results);
        }
Esempio n. 4
0
        // GET: Student
        public ActionResult Index()
        {
            List <Student> students = studentDAL.GetAll();

            ViewData["statuses"] = statusDAL.GetAll();

            return(View(students));
        }
Esempio n. 5
0
 public IEnumerable <Object> GetAll()
 {
     try
     {
         return(_studentDAL.GetAll());
     }
     catch (Exception ex)
     {
         throw new Exception("Error from StudentBLL: " + ex.Message.ToString());
     }
 }