public void Update(Student model) { try { _studentRepository.Update(model); } catch (Exception ex) { throw ex; } }
public void Add(Student model) { try { _studentRepository.Add(model); } catch (Exception ex) { throw ex; } }
private void add(string name,int age) { Student s = new Student(); //s.Id = 1; //s.CollectionName = "Student"; s.Name = name; s.Age = age; s.Score = 100; StudentService ss = new StudentService(); ss.Add(s); }
public ActionResult UpdateStudent() { Student s = new Student(); s.Id = 89; s.Name = "XXXXXXX"; StudentService ss = new StudentService(); ss.Update(s); return Content(""); }