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