Thank you for using our services.
These are two different scenarios.
In the first scenario, you are removing an item from the 'UserLogins'
collection of the 'user' object. This means that you are basically changing the association between the objects thus, one login less for this particular user. In other words, the 'cUserLogin'
object is not deleted from the database, it is just no longer associated to the specified user object.
In the second scenario, the 'cUserLogin
' object is deleted directly from the database and this is the correct way of deleting entities from the database using Telerik Data Access. Look at this article
for more information about this.
Note that for the first scenario to get the code working, you need to change the mapping configuration of the 'user.UserLogins
' property to include a call to the IsManaged
method. For more information, read How to: Manage One-to-Many Association
I hope this information is helpful.
Check out the latest announcement
about Telerik Data Access vNext as a powerful framework
able to solve core development problems.