Exemplo 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());
     }
 }
Exemplo n.º 3
0
        public IQueryable <Student> GetAll()
        {
            StudentDAL           dalObject = new StudentDAL();
            IQueryable <Student> results   = dalObject.GetAll();

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

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

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