public Stage(string name, Nullable <int> price, int duration__month_, string language, Trainer trainer, ProgrammingCourses programmingCours, ClassRoom classRoom)
 {
     Name             = name;
     Price            = price;
     Duration__month_ = duration__month_;
     Language         = language;
     this.Students    = new HashSet <Student>();
     Trainer          = trainer;
     ProgrammingCours = programmingCours;
     ClassRoom        = classRoom;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            using (DB_For_DbFirstEntities db = new DB_For_DbFirstEntities())
            {
                ClassRoom          classRoom1          = new ClassRoom("Create", 24);
                Trainer            trainer1            = new Trainer("Vanik", "Hakobyan", "C#");
                Score              score1              = new Score(9, 9, 9, 9);
                ProgrammingCourses programmingCourses1 = new ProgrammingCourses("C# Bootcamp");
                Student            student1            = new Student("Ani", "Hakobyan", DateTime.Now.AddYears(-24), 9);
                Stage              stage1              = new Stage("Advance", 40000, 1, "C#", trainer1, programmingCourses1, classRoom1);

                db.Stages.Add(stage1);
                stage1.Students.Add(student1);
                student1.Score = score1;

                db.SaveChanges();

                Console.ReadKey();
            }
        }