Пример #1
0
 public ResponseModel Save(Employee employee)
 {
     using (VirtualTraineesEntities db = new VirtualTraineesEntities())
     {
         db.Employees.Add(employee);
         db.SaveChanges();
     }
     return(new ResponseModel());
 }
Пример #2
0
 public ResponseModel Save(Student student)
 {
     using (VirtualTraineesEntities db = new VirtualTraineesEntities())
     {
         db.Students.Add(student);
         db.SaveChanges();
     }
     return(new ResponseModel());
 }
Пример #3
0
 public ResponseModel Save(Teacher teacher)
 {
     using (VirtualTraineesEntities db = new VirtualTraineesEntities())
     {
         db.Teachers.Add(teacher);
         db.SaveChanges();
     }
     return(new ResponseModel());
 }