Delete Entities not working

Posts   
 
    
Rishi
User
Posts: 69
Joined: 31-Oct-2011
# Posted on: 02-Feb-2012 20:27:04   

Hi,

I am using LLBLGen Pro 3.1, SQL Server 2008 and VS 2010

I am trying to delete data using entity tracker, but its not deleting the old data and keep adding same data again and again any idea? Its not throwing any error and i don't see delete query when i run sql profiler.

-- Adding Data to RemovedEntityTracker m_EmployeeEntity.EmpCurrentApptDetails.RemovedEntitiesTracker = New Grb.Framework.Business.Lower.HelperClasses.EntityCollection _ (Of Grb.Framework.Business.Lower.EntityClasses.EmpCurrentApptDetailEntity) m_EmployeeEntity.EmpCurrentApptDetails.RemovedEntitiesTracker.AddRange(m_EmployeeEntity.EmpCurrentApptDetails)

--Clear Entities m_EmployeeEntity.EmpCurrentApptDetails.Clear()

-- Adding new data

m_EmployeeEntity.EmpCurrentApptDetails.Add(employeeCurrentAppointmentDetailsEntity)

-- Deleting old data from Entity tracker

adapter.DeleteEntityCollection(employeeEntity.EmpCurrentApptDetails.RemovedEntitiesTracker)

Rishi

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 02-Feb-2012 22:08:09   

I can't reproduce it just the way you write it.

  • Make sure you are using the latest LLBLGen runtime library version.

  • Are you sure there are entities in the removeEntityTracker collection just before you call Detele?

David Elizondo | LLBLGen Support Team