I have the following table in SQL, which has those 4 data
Through EF I am trying to update the records say ID 3 to be "40" but for more I try the amount always remains at zero
This is the code I'm using:
/*SE AGREGA SALDO AL SALDO EXISTENTE*/
public void addSaldo(int idx, int sal)
{
var datos = new Saldos
{
id = idx,
Cantidad = sal
};
using (var ctx = new ModeloProductos())
{
ctx.Entry(datos).State= EntityState.Modified;
ctx.SaveChanges();
}
}