DAL DTO and DeletedList

DAL DTO and DeletedList

Old forum URL: forums.lhotka.net/forums/t/7045.aspx

Dave.Erwin posted on Thursday, June 04, 2009

I am working on a DAL implementation and am trying to solve an issue with a DTO graph.

Because I need to control the SQL transaction in the DAL I am passing it a DTO that contains the root properties and lists of DTOs for the child collections. I am including IsNew, IsDeleted and IsDirty in each of DTOs.

My question is how to include deleted items from the collections in the lists of DTOs? Iterating over the child collection only gives the active items and DeletedList is Protected.

Has anyone else run across this? It seems like a DTO built like this would make sense since the DAL would have all of the info that it needs to commit the transaction.

I am on CSLA 3.05 because I'm stuck in .NET 2.0.


Dave Erwin

Dave.Erwin replied on Thursday, June 04, 2009

Never mind. Brain cramp. I was trying to fill the entire DTO from the root object. Changed it to call a method in the collection that fills the DTO list. The collection has access to it's DeletedList.

Copyright (c) Marimer LLC