示例#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());
 }