Beispiel #1
0
        //gemizei ton endiameso pinaka
        void AddOrUpdateInstructor(BootCampDbContext context, string courseTitle, string instructorName)
        {
            var crs  = context.Courses.SingleOrDefault(c => c.Title == courseTitle);
            var inst = crs.Instructors.SingleOrDefault(i => i.LastName == instructorName);

            if (inst == null)
            {
                crs.Instructors.Add(context.Instructors.Single(i => i.LastName == instructorName));
            }
        }
Beispiel #2
0
 public EmployeesController(BootCampDbContext context)
 {
     _context = context;
 }