Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
<NoWarn>$(NoWarn.Replace(';1591', ''))</NoWarn>
</PropertyGroup>

<PropertyGroup>
<NuGetAuditLevel>moderate</NuGetAuditLevel>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions benchmark/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\rulesets\EFCore.test.ruleset</CodeAnalysisRuleSet>
<NuGetAudit>false</NuGetAudit>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<ProjectReference Include="..\..\src\EFCore.Sqlite.Core\EFCore.Sqlite.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" />
</ItemGroup>

<ItemGroup>
<None Update="AdventureWorks2014.db">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public virtual void Intercept(IInvocation invocation)
}
else if (LazyLoaderSetter.Equals(invocation.Method))
{
_loader = (ILazyLoader)invocation.Arguments[0];
_loader = (ILazyLoader)invocation.Arguments[0]!;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected virtual string FindPropertyName(IInvocation invocation)
if (indexerPropertyInfo != null
&& indexerPropertyInfo.GetSetMethod(nonPublic: true) == invocation.Method)
{
return (string)invocation.Arguments[0];
return (string)invocation.Arguments[0]!;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public virtual void Intercept(IInvocation invocation)
if (methodName == $"add_{nameof(INotifyPropertyChanged.PropertyChanged)}")
{
_handler = (PropertyChangedEventHandler)Delegate.Combine(
_handler, (Delegate)invocation.Arguments[0]);
_handler, (Delegate)invocation.Arguments[0]!);
}
else if (methodName == $"remove_{nameof(INotifyPropertyChanged.PropertyChanged)}")
{
_handler = (PropertyChangedEventHandler?)Delegate.Remove(
_handler, (Delegate)invocation.Arguments[0]);
_handler, (Delegate)invocation.Arguments[0]!);
}
}
else if (methodName.StartsWith("set_", StringComparison.Ordinal))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public virtual void Intercept(IInvocation invocation)
if (methodName == $"add_{nameof(INotifyPropertyChanging.PropertyChanging)}")
{
_handler = (PropertyChangingEventHandler)Delegate.Combine(
_handler, (Delegate)invocation.Arguments[0]);
_handler, (Delegate)invocation.Arguments[0]!);
}
else if (methodName == $"remove_{nameof(INotifyPropertyChanging.PropertyChanging)}")
{
_handler = (PropertyChangingEventHandler?)Delegate.Remove(
_handler, (Delegate)invocation.Arguments[0]);
_handler, (Delegate)invocation.Arguments[0]!);
}
}
else if (methodName.StartsWith("set_", StringComparison.Ordinal))
Expand Down
5 changes: 5 additions & 0 deletions src/ef/ef.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<Reference Include="System.Configuration" />
</ItemGroup>

<PropertyGroup>
<!-- Permit targeting `netcoreapp2.0`, see https://github.com/dotnet/efcore/issues/34654 -->
<NoWarn>$(NoWarn);NU1903</NoWarn>
</PropertyGroup>

<ItemGroup>
<!-- Permit targeting `netcoreapp2.0`, see https://github.com/dotnet/efcore/issues/34654 -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-7mfr-774f-w5r9" />
Expand Down
1 change: 1 addition & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\rulesets\EFCore.test.ruleset</CodeAnalysisRuleSet>
<LangVersion>preview</LangVersion>
<DefaultNetCoreTargetFramework>net9.0</DefaultNetCoreTargetFramework>
<NuGetAudit>false</NuGetAudit>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -1553,11 +1553,11 @@ public override Task Parameter_collection_Concat_column_collection(bool async)

AssertSql(
"""
@__ints_0='[11,111]'
@__p_0='[11,111]'

SELECT VALUE c
FROM root c
WHERE (ARRAY_LENGTH(ARRAY_CONCAT(@__ints_0, c["Ints"])) = 2)
WHERE (ARRAY_LENGTH(ARRAY_CONCAT(@__p_0, c["Ints"])) = 2)
""");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5802,7 +5802,7 @@ public virtual Task Contains_over_concatenated_parameter_and_constant(bool async

return AssertQuery(
async,
ss => ss.Set<Customer>().Where(c => data.Contains(someVariable + "SomeConstant")));
ss => ss.Set<Customer>().Where(c => ((IEnumerable<string>)data).Contains(someVariable + "SomeConstant")));
}

[ConditionalTheory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ public virtual Task Parameter_collection_Concat_column_collection(bool async)

return AssertQuery(
async,
ss => ss.Set<PrimitiveCollectionsEntity>().Where(c => ints.Concat(c.Ints).Count() == 2));
ss => ss.Set<PrimitiveCollectionsEntity>().Where(c => ((IEnumerable<int>)ints).Concat(c.Ints).Count() == 2));
}

[ConditionalTheory] // #33582
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,18 +1519,18 @@ public override async Task Parameter_collection_Concat_column_collection(bool as

AssertSql(
"""
@__ints_0='[11,111]' (Size = 4000)
@__p_0='[11,111]' (Size = 4000)

SELECT [p].[Id], [p].[Bool], [p].[Bools], [p].[DateTime], [p].[DateTimes], [p].[Enum], [p].[Enums], [p].[Int], [p].[Ints], [p].[NullableInt], [p].[NullableInts], [p].[NullableString], [p].[NullableStrings], [p].[String], [p].[Strings]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE (
SELECT COUNT(*)
FROM (
SELECT 1 AS empty
FROM OPENJSON(@__ints_0) AS [i]
FROM OPENJSON(@__p_0) AS [p0]
UNION ALL
SELECT 1 AS empty
FROM OPENJSON([p].[Ints]) AS [i0]
FROM OPENJSON([p].[Ints]) AS [i]
) AS [u]) = 2
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1542,18 +1542,18 @@ public override async Task Parameter_collection_Concat_column_collection(bool as

AssertSql(
"""
@__ints_0='[11,111]' (Size = 4000)
@__p_0='[11,111]' (Size = 4000)

SELECT [p].[Id], [p].[Bool], [p].[Bools], [p].[DateTime], [p].[DateTimes], [p].[Enum], [p].[Enums], [p].[Int], [p].[Ints], [p].[NullableInt], [p].[NullableInts], [p].[NullableString], [p].[NullableStrings], [p].[String], [p].[Strings]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE (
SELECT COUNT(*)
FROM (
SELECT 1 AS empty
FROM OPENJSON(@__ints_0) AS [i]
FROM OPENJSON(@__p_0) AS [p0]
UNION ALL
SELECT 1 AS empty
FROM OPENJSON([p].[Ints]) AS [i0]
FROM OPENJSON([p].[Ints]) AS [i]
) AS [u]) = 2
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1501,18 +1501,18 @@ await Assert.ThrowsAsync<EqualException>(

AssertSql(
"""
@__ints_0='[11,111]' (Size = 8)
@__p_0='[11,111]' (Size = 8)

SELECT "p"."Id", "p"."Bool", "p"."Bools", "p"."DateTime", "p"."DateTimes", "p"."Enum", "p"."Enums", "p"."Int", "p"."Ints", "p"."NullableInt", "p"."NullableInts", "p"."NullableString", "p"."NullableStrings", "p"."String", "p"."Strings"
FROM "PrimitiveCollectionsEntity" AS "p"
WHERE (
SELECT COUNT(*)
FROM (
SELECT 1
FROM json_each(@__ints_0) AS "i"
FROM json_each(@__p_0) AS "p0"
UNION ALL
SELECT 1
FROM json_each("p"."Ints") AS "i0"
FROM json_each("p"."Ints") AS "i"
) AS "u") = 2
""");
}
Expand Down