public void Post([FromBody] StudentsV2 students) { if (ModelState.IsValid) { _studentRepo.Add(students); } }
public void Put(int id, [FromBody] StudentsV2 students) { students.Id = id; if (ModelState.IsValid) { _studentRepo.Update(id, students); } }
public void Post([FromBody] StudentsV2 students) { if (ModelState.IsValid) { _studentRepo.Add(students); } }
public void Put(int id, [FromBody] StudentsV2 students) { students.Id = id; if (ModelState.IsValid) { _studentRepo.Update(id, students); } }