orchardcms

how to set value in orchard core text field in asp net core


I'm trying to write my own API to fill an orchard core content type which has several text field. for example the content type named "test" has two fields named first name and last name and are text fields. I know by using contentItem.Content.test.firstName.Text.Value I can get the value. but as I use contentItem.Content.test.firstName="Mary" and then calling createAsync, just a new content Item is created which is empty. would you please help me? thanks

ps:test is the part name too


Solution

  • I solved the problem by using dynamic object variable