Esempio n. 1
0
File: Check.cs Progetto: GAlex7/TA
        public static void Main()
        {
            var disciplines = GetDisciplines();
            var teacher = new Teacher("Ivaylo Kenov", disciplines);
            teacher.AddComment("The best one!");

            var student = new Student("Ivancho");
            Console.WriteLine(student.ID);

            var course = new Course("a");
            course.AddTeacher(teacher);
            course.AddStudent(student);
        }
Esempio n. 2
0
 public void EditStudent(Student entity)
 {
     this.db.Students.FirstOrDefault(t => t.Id == entity.Id).ModifiedOn = DateTime.Now;
     this.db.SaveChanges();
 }
Esempio n. 3
0
 public void CreateStudent(Student entity)
 {
     this.db.Students.Add(entity);
     this.db.SaveChanges();
 }
Esempio n. 4
0
 public void DeleteStudent(Student entity)
 {
     entity.IsDeleted = true;
     entity.DeletedOn = DateTime.Now;
     this.db.SaveChanges();
 }