I'm using v2.6, adapter, on an SQLExpress 2008 database with c# .Net 3.5 General2008 presets.
I'm having trouble saving an existing entity with added records in one of its related entity collections.
Here is my code
UnitOfWork2 uow = new UnitOfWork2();
uow.AddCollectionForDelete((IEntityCollection2)path.Pathstops.RemovedEntitiesTracker);
uow.AddCollectionForSave((IEntityCollection2)bsAllPaths.DataSource);
Commit(uow);
bsAllPaths.EndEdit();
public static bool Commit(UnitOfWork2 uow)
{
bool result = false;
using (DataAccessAdapter adapter = new DataAccessAdapter(Utils.DBConnection))
{
if (uow.Commit(adapter, true) > 0) result = true;
}
return result;
}
The AddCollectionForSave method is adding two entities to the UoW. I know that one of them has a brand new collection of related entities (pathStops) which needs to be saved. That same entity has a collection in the RemovedEntitiesTracker which needs to be deleted (first). Nothing is happening.
I've tried enabling tracing by adding the following to the app.config file:
<system.diagnostics>
<switches>
<add name="SqlServerDQE" value="3" />
<add name="AccessDQE" value="0" />
<add name="OracleDQE" value="0" />
<add name="FirebirdDQE" value="0" />
<add name="MySqlDQE" value="0" />
<add name="DB2DQE" value="0" />
<add name="PostgeSqlDQE" value="0" />
<add name="SybaseAsaDQE" value="0" />
<add name="SybaseAseDQE" value="0" />
<add name="ORMGeneral" value="0" />
<add name="ORMStateManagement" value="0" />
<add name="ORMPersistenceExecution" value="0" />
<add name="LinqExpressionHandler" value="0" />
</switches>
</system.diagnostics>
and I'm getting some data printed out in vs2008's output window, but I can't see what query is being executed in the UoW (and SQLExpress 2008 doesn't have a profiler). Can you tell me what I might be missing?