Hi Everyone,
I'm relatively new to LLBLGen and I'm just wondering how to better write code to enable some re-use or modules.
An example I can think of at the moment would be an Address Entity. Over all applications that it's used in it will have a consistent class or DB Structure (Name, Address Line 1, Suburb & Postcode). I've also built a really simple user control that displays the information and also querys a postcode table populated with all standard suburbs and postcodes to autocomplete entries.
My question is what's the best way to put the Address Entity, PostData Entity and user controls etc in a library project/solution and then reference the Address Entity from say a Customer entity which may have a Physical and Postal Address (and so the related FK to the Address Entity / Table) from the actual DAL in the final application?
LLBLGen would generate the FK properties for me - but how would I go about linking the actual entities together (and also using them with complex queries such as find all Customers that have an Address in Postcode 1234)?
Normally I'd just create a relation like:
Dim relationsToUse As New RelationCollection()
relationsToUse.Add(EntityClasses.CustomerEntity.Relations.AddressEntityUsingFkPhysicalAddressId)
Any insights on this would be much appreciated!