MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Extending the MonoX User Profile  (Mono Support )

Viewed 21884 time(s), 2 post(s) 8/26/2015 5:45:43 PMby sharedbinder
sharedbinder

sharedbinder

8/26/2015 5:45:43 PM

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.

This content has not been rated yet. 
105 Reputation 10 Total posts
zhuber

zhuber

8/31/2015 10:33:56 AM
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.
This content has not been rated yet. 
145 Reputation 18 Total posts