Hope someone can help. I am trying to update a collection of entities but only the first item is being persisted to the database. I am using LLBLGen Pro V4.2 Final
public void SavePersonnel(IEnumerable<PersonnelEntity> personnelEntities)
{
using (var adapter = new DataAccessAdapter())
{
var personnelToBeSaved = new EntityCollection<PersonnelEntity>(personnelEntities);
// foreach (var personnel in personnelToBeSaved)
// adapter.SaveEntity(personnel, true, true);
adapter.SaveEntityCollection(personnelToBeSaved, true, true);
}
}
I have inspected the entities at every stage and the all have IsDirty = true and the correct field marked up as changed.
After the SaveEntityCollection method has been called, only the first item in the collection has IsDirty set back to False and the field changed value set to false and is persisted to the database. The remainder all still have IsDirty = True.
Any ideas?