I just switched from L2S to OA. I have new ASP.NET database application using OpenAccess. In database I have two tables, Baskets
. Between then is N:M relation, so there is third table BasketFiles
with BasketId and FileId columns. I created this relation in OA object designer, si BasketFiles table is hidden and I don't have explicit access to it.
No problem with reading or modifying, but I'm not able to selectively delete "file" objects from basket. If I try to remove then with this code:
) = UIHelpers.GetSelectedPrimaryKeys(rgFiles,
'get list of integers (selected primary keys from RadGrid
' List of File items (those are not IO.File!, it is normal db entity)
I get some sort of error like Entity removed, enumeration cant continue... There is no "selectedBasket.Files.Delete (file as Gaia.File)" method in OpenAccess Linq.
In "standard" LINQ I would use eg
dc.BasketFiles.Delete (files.Where (Function (q) selectedIds.Contains(q.fileId)))
But no Delete method for object in available OpenAccess ...
Thank you for your help.