Quantcast
Viewing all articles
Browse latest Browse all 764

Moving a business object from a list to a new list

Hi,

I have a simple scenario, made it into a test so I can see it better, let me know if you need to code:

 

0: loadedUser.BeginEdit()

1: Vendor vendor = loadedUser.AvailableVendors[0]

2: loadedUser.AvailableVendors.Remove(vendor)

3: loadedUser.Vendors.Add(vendor).

4: loadedUser.ApplyEdit() --------->>>> Crush, Edit level mismatch.

 

Why does it crush ?

I've asked myself the same question for about 3 hours now, and finally stumbled on DeletedList, so if on line 2 I remove the vendor from the DeleteList then we are fine all works great.

Does anybody have a good explanation on this please ?

 

Thank you,


Viewing all articles
Browse latest Browse all 764

Trending Articles