I have a dictionary detalles var movimiento_det = new MovimientoDet(); //
foreach (var detalle in detalles)
{
movimiento_det.MovimientoDetId = G.Serial("movimiento_det"); // get me the id of the entity
movimiento_det.MovimientoDetId= i;
movimiento_det.ProductoId = detalle.Value.ProductoId;
movimiento_det.Cantidad = detalle.Value.Cantidad;
Vmsb.MovimientoDets.Add(movimiento_det);
}
Vmsb.SaveChanges();
I want to save all values of the dictonary but it just saving to the database the last data in the foreach how can i do to save all the data
using ef5, and vs2012