Пример #1
0
 public ClassActivity Delete(ClassActivity itemToDelete)
 {
     _context.ClassActivities.Remove(itemToDelete);
     return itemToDelete;
 }
Пример #2
0
 public ClassActivity Update(ClassActivity itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     return itemToUpdate;
 }
Пример #3
0
 public ClassActivity Create(ClassActivity itemToCreate)
 {
     var classactivity = _context.ClassActivities.Add(itemToCreate);
     _context.Entry(classactivity.AcademicYear).State = EntityState.Modified;
     return classactivity;
 }