Пример #1
0
        public int GetStudentsNumber(Group group)
        {
            int number;

            using (StudentsBL studentsBl = new StudentsBL())
            {
                number = studentsBl.GetList().Count(stud => stud.GroupNumber == group.GroupNumber);
            }
            return(number);
        }
Пример #2
0
        static void Main(string[] args)
        {
            StudentsBL bl = new StudentsBL();

            Console.WriteLine(bl.GetList().Count());
            Student stud = new Student {
                FullName = "Test"
            };

            bl.Add(stud);
            Console.WriteLine(bl.GetList().Count());
            Console.ReadKey();
        }