Пример #1
0
        public List <Course> DrowCourseID()
        {
            List <Course> _list = new List <Course>();

            using (TritonEntities EFDbContext = new TritonEntities())
            {
                var CourseData = (from CourseTable in EFDbContext.Courses

                                  select CourseTable)
                                 .Distinct();

                if (CourseData.Any())
                {
                    foreach (Course st in CourseData)
                    {
                        _list.Add(st);
                    }
                }
                else
                {
                }
            }
            return(_list);
        }
Пример #2
0
        public List <Student> DrowStudentID()
        {
            List <Student> _list = new List <Student>();

            using (TritonEntities EFDbContext = new TritonEntities())
            {
                var StudentData = (from StudentTable in EFDbContext.Students

                                   select StudentTable)
                                  .Distinct();

                if (StudentData.Any())
                {
                    foreach (Student st in StudentData)
                    {
                        _list.Add(st);
                    }
                }
                else
                {
                }
            }
            return(_list);
        }