Fix nullable warnings

This commit is contained in:
2025-04-16 13:09:56 +02:00
parent 7523cd617b
commit 5bc6c9ae7d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.8.0</Version>
<Version>0.8.1</Version>
<LangVersion>latest</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Alexandru Macocian</Authors>
+1 -1
View File
@@ -188,7 +188,7 @@ command.CommandText = @""{placeHolder}"";
.AppendLine()
.AppendLine("};");
var methodBuilder = SyntaxBuilder.CreateMethod($"{Constants.ValueTaskType}<{context.DboType}>", Constants.FindMethodName)
var methodBuilder = SyntaxBuilder.CreateMethod($"{Constants.ValueTaskType}<{context.DboType}?>", Constants.FindMethodName)
.WithModifiers($"{Constants.Public} {Constants.Async}")
.WithParameter(context.PrimaryKey.PropertyType, Constants.PrimaryKeyArgumentName)
.WithParameter(Constants.CancellationTokenType, Constants.CancellationTokenArgument)
+1 -1
View File
@@ -148,7 +148,7 @@ public sealed class TableContextGenerator : IIncrementalGenerator
// Replace placeholders with formatted command text
var syntax = builder.Build();
var source = syntax.ToFullString()
var source = $"#nullable enable\n{syntax.ToFullString()}\n#nullable disable"
.Replace(createMethod.Placeholder, createMethod.CommandText)
.Replace(createIfNotExistsMethod.Placeholder, createIfNotExistsMethod.CommandText)
.Replace(insertMethod.Placeholder, insertMethod.CommandText)