Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit d5f98aa

Browse files
committed
Fixed compiler warnings.
1 parent 99915a8 commit d5f98aa

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

Tests/LinqToDB.EntityFrameworkCore.BaseTests/LinqToDB.EntityFrameworkCore.BaseTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="linq2db.Tools" Version="3.2.3" />
13+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
1314
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.11" />
1415
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.11" />
1516
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.11" />

Tests/LinqToDB.EntityFrameworkCore.BaseTests/Logging/TestLogger.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ internal class TestLogger : ILogger
1313
private static readonly string _newLineWithMessagePadding;
1414

1515
// ConsoleColor does not have a value to specify the 'Default' color
16+
#pragma warning disable 649
1617
private readonly ConsoleColor? DefaultConsoleColor;
18+
#pragma warning restore 649
1719

1820
private readonly string _name;
1921

Tests/LinqToDB.EntityFrameworkCore.PostgreSQL.Tests/NpgSqlTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,21 @@ public NpgSqlTests()
3131
_options = optionsBuilder.Options;
3232
}
3333

34-
private NpgSqlEnititesContext CreateNpgSqlExntitiesContext()
34+
private NpgSqlEnititesContext CreateNpgSqlEntitiesContext()
3535
{
3636
var ctx = new NpgSqlEnititesContext(_options);
3737
ctx.Database.EnsureDeleted();
3838
ctx.Database.EnsureCreated();
39+
ctx.Database.ExecuteSqlRaw("create schema \"views\"");
40+
ctx.Database.ExecuteSqlRaw("create view \"views\".\"EventsView\" as select \"Name\" from \"Events\"");
3941
return ctx;
4042
}
4143

4244

4345
[Test]
4446
public void TestFunctionsMapping()
4547
{
46-
using (var db = CreateNpgSqlExntitiesContext())
48+
using (var db = CreateNpgSqlEntitiesContext())
4749
{
4850
var date = DateTime.UtcNow;
4951

Tests/LinqToDB.EntityFrameworkCore.PostgreSQL.Tests/SampleTests/AAA.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
using System;
22
using System.Threading.Tasks;
33

4+
#pragma warning disable 8604
5+
#pragma warning disable CS8625
6+
47
namespace LinqToDB.EntityFrameworkCore.PostgreSQL.Tests.SampleTests
58
{
69
public class Unit

Tests/LinqToDB.EntityFrameworkCore.SqlServer.Tests/IssueTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace LinqToDB.EntityFrameworkCore.SqlServer.Tests
99
[TestFixture]
1010
public class IssueTests : TestsBase
1111
{
12-
private DbContextOptions<IssueContext>? _options;
12+
private DbContextOptions<IssueContext> _options = null!;
1313
private bool _created;
1414

1515
public IssueTests()

Tests/LinqToDB.EntityFrameworkCore.SqlServer.Tests/Models/IssueModel/IssueContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
4343
modelBuilder
4444
.Entity<Patent>()
4545
.HasOne(p => p.Assessment)
46-
.WithOne(pa => pa.Patent)
46+
.WithOne(pa => pa!.Patent)
4747
.HasForeignKey<PatentAssessment>(pa => pa.PatentId)
4848
.OnDelete(DeleteBehavior.Restrict);
4949

Tests/LinqToDB.EntityFrameworkCore.SqlServer.Tests/ToolsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ public async Task TestSetUpdate([Values(true, false)] bool enableFilter)
669669
{
670670
using (var ctx = CreateContext(enableFilter))
671671
{
672-
var customer = await ctx.Customers.FirstOrDefaultAsync();
672+
var customer = await ctx.Customers.FirstAsync();
673673

674674
var updatable = ctx.Customers.Where(c => c.CustomerId == customer.CustomerId)
675675
.Set(c => c.CompanyName, customer.CompanyName);

0 commit comments

Comments
 (0)