public ClassActivity Delete(ClassActivity itemToDelete)
 {
     _context.ClassActivities.Remove(itemToDelete);
     return itemToDelete;
 }
 public ClassActivity Update(ClassActivity itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     return itemToUpdate;
 }
 public ClassActivity Create(ClassActivity itemToCreate)
 {
     var classactivity = _context.ClassActivities.Add(itemToCreate);
     _context.Entry(classactivity.AcademicYear).State = EntityState.Modified;
     return classactivity;
 }