在.NET核心C#中,没有与Microsoft.Graph一起使用的示例,API都是JSON。 我能够创建选择站点列,但默认值不起作用
Microsoft.Graph.ColumnDefinition column = new Microsoft.Graph.ColumnDefinition
{
ColumnGroup = "ECGmc",
DisplayName = "Document Stage",
Name = "DocumentStage",
Choice = new ChoiceColumn { ODataType= "microsoft.graph.choiceColumn", AllowTextEntry = false,
Choices = new List<string>() { "Working Draft", "Discussion Draft", "Final" }, DisplayAs = "dropDownMenu" },
DefaultValue = new DefaultColumnValue { Value = "Working Draft", ODataType= "microsoft.graph.defaultColumnValue" },
Description = "Will differ the stages the Document changes",
Required = true
};
Microsoft.Graph.ColumnDefinition newColumn = await graphClient.Groups[project.GroupID].Sites["root"].Columns.Request().AddAsync(column);
有效,但是DefaultValue为空。
有人知道如何设置DefaultValue吗? 有谁知道我在哪里可以找到Microsoft.Graph的C#示例?