How to obtain User Profile Metadata , Commerce Server 2009

Quoted from:
http://social.msdn.microsoft.com/Forums/en-US/commserver2009/thread/7729cd29-1921-4d13-89d1-d1a23fcf0684


To retrieve metadata for the UserProfile entity, use the following syntax:

var query = new CommerceQuery<CommerceEntityDefinition, CommerceModelSearch<CommerceEntity>>();
query.SearchCriteria.Model.ModelName = "UserProfile";


If you have strongly-typed wrapper classes, including a UserProfile wrapper class then this
syntax should be used:

var query = new CommerceQuery<CommerceEntityDefinition, CommerceModelSearch<UserProfile>>();