I have a problem using dataadapter...
When i try to recursive save an entity with an EntityCollection that it´s entity was deleted from database, the new itens of EntityCollection is not saved in database;
What i have to do?
I have already tryied to flag as isnew, but did not work well
Example:
if(!Bolsa.IsNew)
{
this.DataAccessAdapter.DeleteEntitiesDirectly("InsumoEntity", Bolsa.GetRelationInfoInsumoCollection());
this.DataAccessAdapter.DeleteEntitiesDirectly("ItemOrMaEntity", Bolsa.OrdemManipulacao.GetRelationInfoItemOrMaCollection());
}
for(int i = Bolsa.InsumoCollection.Count -1; i<=0;i--)
{
InsumoEntity Insumo = (InsumoEntity)Bolsa.InsumoCollection[ i];
Insumo.IsNew = false;
Insumo.Bolsa = null;
Insumo.Bolsa = Bolsa;
Insumo.IsNew = true;
}
this.DataAccessAdapter.SaveEntity(Bolsa, true, null, true);
thank´s