public List <Program> List()
 {
     using (var context = new Activity4Context())
     {
         return(context.Programs.ToList());
     }
 }
예제 #2
0
 public Student FindByPKID(int studentid)
 {
     using (var context = new Activity4Context())
     {
         return(context.Students.Find(studentid));
     }
 }
예제 #3
0
 public List <Student> List()
 {
     using (var context = new Activity4Context())
     {
         return(context.Students.ToList());
     }
 }
예제 #4
0
 public int Update(Student item)
 {
     using (var context = new Activity4Context())
     {
         context.Entry(item).State = System.Data.Entity.EntityState.Modified;
         return(context.SaveChanges());
     }
 }