Exemplo n.º 1
0
        public List <Student> ListStudents()
        {
            var db = new AppEfDbContext();

            return(db.Students.ToList());
        }
Exemplo n.º 2
0
        public Student GetStudent(int id)
        {
            var db = new AppEfDbContext();

            return((db.Students.Find(id) == null) ?null : db.Students.Find(id));
        }
Exemplo n.º 3
0
        public List <Student> ListStudents()
        {
            var db = new AppEfDbContext(); //create an instance of the context

            return(db.Students.ToList());
        }