Esempio n. 1
0
 public List<Team> GetAllTeams()
 {
     using (StudentsModel db = new StudentsModel())
     {
         return db.Teams.ToList();
     }
 }
Esempio n. 2
0
 public List <Team> GetAllTeams()
 {
     using (StudentsModel db = new StudentsModel())
     {
         return(db.Teams.ToList());
     }
 }
Esempio n. 3
0
 public void InsertStudent(Student student)
 {
     using (StudentsModel db = new StudentsModel())
     {
         db.Students.Add(student);
         db.SaveChanges();
     }
 }
Esempio n. 4
0
 public void CreateTeam(string name, DateTime startDate, DateTime endDate)
 {
     using (StudentsModel db = new StudentsModel())
     {
         db.Teams.Add(new Models.Team { Name = name, StartDate = startDate, EndDate = endDate, CreatedDate = DateTime.Now });
         db.SaveChanges();
     }
 }
Esempio n. 5
0
 public void InsertStudent(Student student)
 {
     using (StudentsModel db = new StudentsModel())
     {
         db.Students.Add(student);
         db.SaveChanges();
     }
 }
Esempio n. 6
0
        public PortManager()
        {
            using (StudentsModel db = new StudentsModel())
            {
            }

            OpenPorts = new List<int>();
            ListAvailableTCPPort(ref OpenPorts);
        }
Esempio n. 7
0
 public void CreateTeam(string name, DateTime startDate, DateTime endDate)
 {
     using (StudentsModel db = new StudentsModel())
     {
         db.Teams.Add(new Models.Team {
             Name = name, StartDate = startDate, EndDate = endDate, CreatedDate = DateTime.Now
         });
         db.SaveChanges();
     }
 }