我在 django 中收到以下错误model.objects.get_or_create。
SQLServer [FreeTDS][SQL Server]The data types nvarchar(max) and ntext
are incompatible in the equal to operator.
Run Code Online (Sandbox Code Playgroud)
列 django 抱怨NVARCHAR(MAX)SQLServer 中允许为 null。
Django 模型元素定义为 TextField(null=True)
我需要调用一个公开操作的服务器。此操作具有复杂类型集合的字符串或复杂类型集合作为参数。我也需要打电话。
元数据是:
任何一个:
<Action Name="BulkChange" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(PropertyCore.InspectionDuty)"/>
<Parameter Name="Comment" Type="Edm.String" Unicode="false"/>
<Parameter Name="Changes" Type="Collection(PropertyCore.InspectionDutyChange)"/>
</Action>
Run Code Online (Sandbox Code Playgroud)
具有以下复杂类型:
<ComplexType Name="InspectionDutyChange">
<Property Name="Operation" Type="Operations.Operations" Nullable="false"/>
<Property Name="Identity" Type="Edm.Guid" Nullable="false"/>
<Property Name="IsDisabled" Type="Edm.Boolean" Nullable="false"/>
<Property Name="SeriesStart" Type="Edm.DateTimeOffset"/>
<Property Name="Interval" Type="Common.Interval"/>
<NavigationProperty Name="Module" Type="PropertyCore.Module"/>
<NavigationProperty Name="Equipment" Type="PropertyCore.Equipment"/>
<NavigationProperty Name="OperatorTask" Type="PropertyCore.OperatorTask"/>
</ComplexType>
Run Code Online (Sandbox Code Playgroud)
或者,或者:
<Action Name="BulkChange" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(PropertyCore.InspectionDuty)"/>
<Parameter Name="Updates" Type="PropertyCore.InspectionDutyChanges"/>
</Action>
Run Code Online (Sandbox Code Playgroud)
复杂类型定义为
<ComplexType Name="InspectionDutyChanges">
<Property Name="Comment" Type="Edm.String"/>
<Property Name="Changes" Type="Collection(PropertyCore.InspectionDutyChange)"/>
</ComplexType>
<ComplexType Name="InspectionDutyChange">
<Property Name="Operation" Type="Operations.Operations" Nullable="false"/>
<Property Name="Identity" Type="Edm.Guid" Nullable="false"/>
<Property …Run Code Online (Sandbox Code Playgroud) 我将现有库从 .Net Framework 4.7.2 移植到 .Net Standard 2.0,以使其跨平台,但仍保留与 .Net Framework 应用程序的兼容性。
我不明白如何避免非跨平台依赖关系。
我的库使用动态类型和Settings.Designer.cs。
为了在 .Net Standard 中支持它,我必须添加对NuGet包的引用,这反过来又添加了对其他一些包(如 )的依赖项,即使我不使用任何与安全相关的代码。Microsoft.CSharpSystem.Configuration.ConfigurationManagerSystem.Security.Principal.Windows
最后两个显然是Microsoft.Windows.Compatibility包的一部分。
当我转到.NET API 浏览器时,我看到它Microsoft.Csharp不在 .Net Standard 2.0 中,但它在 .Net Platform Extensions 2.1 及更高版本中。这是否意味着这个包不是跨平台的?是否有其他服务可以检查 NuGet 包的平台支持?
dotnet publish -c Release --self-contained true --runtime linux-x64,该应用程序实际上在 Linux 计算机上运行良好。这是否意味着我的库是完全跨平台的,我可以在生产中安全地使用它,或者我System.PlatformNotSupportedException将来可能仍然会在 Linux 上遇到?