I am starting to write a configuration program to configure a Sitefinity solution that is about to be deployed.
I am looking for information on how to add fields to the basic Sitefinity profile type through code. I need to add 6 new fields to the "Telerik.Sitefinity.Security.Model.SitefinityProfile" type only using code. Is there any way to accomplish this? Are there any code examples out there that manage profile type fields?
Thanks for the link, but there is no mention of adding new fields to existing user profiles. Is there any way to do this?
I have figured it out, seems adding fields was only possible using the Fluent API, here is the code in case others want to do something similar:
Old thread, but I wanted to add the following to the conversation.
When doing this, if I did not map the ColumnName property, then when I tried to retrieve the field it through a database error. My complex name (TestThisObjectId) mapped to Test_this_object_Id in the database and it had trouble resolving.
Also, a code example for querying against the user profiles that worked for me. Trying to query against GetProfiles<>() with a standard LINQ FirstOrDefault/Where caused a database exception, so hopefully this technique helps.