Hello Bill,
There is no way to map
EAV (
Entity-Attribute-Value) table rows to entity properties using
OpenAccess.
You can define a method that loads all required details for single user or define a
FetchStrategy that loads all related records from the two additional tables when loading more then one row from
User data.
I suggest that you define your
User class to contain all required additional properties in a partial class extension.
The code should look like this:
Next in your data layer (or business layer if there is no data layer) you can define a method that loads all
User properties using
LINQ queries:
Keep in mind that this solution provides
READ-ONLY access to these properties!
If you need to load the additional properties for many users at once you can define a
Fetch Strategy using code like this:
Please accept this code with a grain of salt since I have written all of it without you data model and there could be some small syntactic errors, but you should be able to understand the idea.
Let me know if you have any difficulties implementing the proposed solution.
Kind regards,
Viktor Zhivkov
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!