Metodo para Serializacion en Java
Metodo para Serializacion en Java
get
post
Registro Usuario
Post
Registro Clientes
Post
{
SqlConnection con = new SqlConnection("Data Source=LAPTOP-TEJ9IAPK;user
id=EmanuelT; password=Qwerty123; Initial Catalog=VerificaCredito; Integrated
Security=true; Trusted_Connection=SSPI");
SqlCommand cmd = new SqlCommand("SELECT * FROM Clientes");
var clientes = await _context.Clientes.FindAsync(Nombre_Cliente);
if (clientes == null)
{
return NotFound();
}
// return clientes;
}
// PUT: api/Clientes1/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?
linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutClientes(int id, Clientes clientes)
{
if (id != clientes.Id)
{
return BadRequest();
}
_context.Entry(clientes).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!ClientesExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}