public ResponseModel Save(Student student)
        {
            using (SchoolManagementDBEntities db = new SchoolManagementDBEntities())
            {
                DbSet<Student> students = db.Students;
                students.Add(student);
                db.SaveChanges();

                return new ResponseModel();
            }
        }
Пример #2
0
 public bool Post(Student student)
 {
     StudentManager manager = new StudentManager();
     manager.Add(student);
     return true;
 }
Пример #3
0
 public void Add(Student student)
 {
     DbSet<Student> students = Db.Students;
     students.Add(student);
     Db.SaveChanges();
 }