Mono Support Extending the MonoX User Profile 

Viewed 25334 time(s), 2 post(s), 8/26/2015 5:45:43 PM - by sharedbinder
8/26/2015 5:45:43 PM
105 Reputation 10 Total posts

I am setting up a child entity of the user profile in MonoX. (The new entity is called UserExperience (a collection of user experiences) and it is a child of the user profile; it will never be used except in conjunction with the profile.) Right now I am relating it to the AspnetUsersEntity. Should I setting up the relationships to the UserProfileEntity instead? When I try to use the DataManager (for example, in the EditProfile control) to bind my new data it utilizes the UserProfileEntity.

I am curious about what the difference is and what I should use to extend the profile appropriate. Thanks for your response.

1
8/31/2015 10:33:56 AM
145 Reputation 18 Total posts

Hi,

1. Extend UserProfile with your UserExperience in database.
2. Re-generate MonoX DAL with LLBLGen which will then create UserExperienceEntity with relation to UserProfile.
3. Add prefetch path from UserProfile to UserExperience in GetUserProfile method inside UserProfileRepository:

PrefetchPath2 pp = new PrefetchPath2(EntityType.UserProfileEntity);
pp.Add(UserProfileEntity.PrefetchPathAspnetUser).SubPath.Add(AspnetUsersEntity.PrefetchPathAspnetMembership);
pp.Add(UserProfileEntity.PrefetchPathUserExperience); // Add this line

NOTE: If you have access to "Priority Support", you can post your questions there.

Regards,
Zeljko.

2
This is a demo site for MonoX. Please visit Mono Software for more info.