aim48 wrote:
Hi,
I would like to add a record to a collection but I don't want to retreive all of the records allready in the collection:
For example:
OrganizationEntity org = new OrganizationEntity(OrgID);
org.IsActive = true;
OrganizationSaleEntity orgzSale = new OrganizationSaleEntity();
orgzSale.MemberID = MemberID;
// here
org.GetMultiOrganizationSale().Add(orgzSale);
//
org.Save();
However the GetMulti - loads all of the records from the database (quite many) - is there any way to get get a non databound collection that is attached to a parent entity?
Thanks
Each entity also has empty collections to related tables.
Try something like this:
org.OrganizationSale.Add(orgzSale);
org.Save(true);
The boolean true value in the Save method informs LLBLGen to perform a recursive save.
Let me know if I didn't interpret your question correctly.