Exemplo n.º 1
0
 public ActionResult Post([FromBody] StudentsDB studentDB)
 {
     data.Student.Add(studentDB);
     data.SaveChanges();
     // CreatedAtRouteResult = funcion de ASP.Net para redireccionar lo que agrega
     return(new CreatedAtRouteResult("Student", new { id = studentDB.id }, studentDB));
 }