public ActionResult <Student> Edit([FromBody] Student update, int id) { try { update.Id = id; return(Ok(_ss.Edit(update))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <IActionResult> Edit(int id, [FromBody] StudentEditDto model) { if (!ModelState.IsValid) { return(BadRequest(this.GetErrors(model))); } OperationResult result = await _service.Edit(model); if (result.HasError) { return(this.Unprocessable(result)); } return(Ok(result)); }
public void Edit(StudentDAL std) { StudentsSVC.Edit(std); }
public void Edit(Student std) { studentsService.Edit(std); }