Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public void Edit(StudentDAL std)
 {
     StudentsSVC.Edit(std);
 }
Exemplo n.º 4
0
 public void Edit(Student std)
 {
     studentsService.Edit(std);
 }