【发布时间】:2019-10-20 13:07:33
【问题描述】:
在 .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 为空。
有谁知道如何设置默认值? 有谁知道我在哪里可以找到 Microsoft.Graph 的 C# 示例?
【问题讨论】:
标签: c# .net-core azure-functions azure-ad-graph-api office365api