Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Nov 8, 2021
1 parent 8912f9c commit f269397
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions EFCore.SqlServer.HierarchyId.Test/MigrationTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore.Design;
using System;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.EntityFrameworkCore.Design.Internal;
using Microsoft.EntityFrameworkCore.Migrations.Design;
using Microsoft.EntityFrameworkCore.SqlServer.Test.Models.Migrations;
using Microsoft.Extensions.DependencyInjection;
using System;
using Xunit;

namespace Microsoft.EntityFrameworkCore.SqlServer
Expand Down
24 changes: 12 additions & 12 deletions EFCore.SqlServer.HierarchyId.Test/QueryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ public void Can_insert_HierarchyId()
_db.ChangeTracker.Clear();

var queried = _db.Patriarchy.Where(e => e.Name.StartsWith("Th")).OrderBy(e => e.Id).ToList();

Assert.Equal(3, queried.Count);

Assert.Equal(HierarchyId.Parse("/2/1/"), queried[0].Id);
Assert.Equal("Thrór", queried[0].Name);

Assert.Equal(HierarchyId.Parse("/2/2/"), queried[1].Id);
Assert.Equal("Thráin II", queried[1].Name);

Assert.Equal(HierarchyId.Parse("/3/"), queried[2].Id);
Assert.Equal("Thorin Oakenshield", queried[2].Name);
}
Expand All @@ -215,15 +215,15 @@ public void Can_insert_and_update_converted_HierarchyId()
_db.ChangeTracker.Clear();

var queried = _db.ConvertedPatriarchy.Where(e => e.Name.StartsWith("Th")).OrderBy(e => e.Id).ToList();

Assert.Equal(3, queried.Count);

Assert.Equal(HierarchyId.Parse("/2/1/").ToString(), queried[0].HierarchyId);
Assert.Equal("Thrór", queried[0].Name);

Assert.Equal(HierarchyId.Parse("/2/2/").ToString(), queried[1].HierarchyId);
Assert.Equal("Thráin II", queried[1].Name);

Assert.Equal(HierarchyId.Parse("/3/").ToString(), queried[2].HierarchyId);
Assert.Equal("Thorin Oakenshield", queried[2].Name);

Expand All @@ -233,15 +233,15 @@ public void Can_insert_and_update_converted_HierarchyId()
_db.ChangeTracker.Clear();

queried = _db.ConvertedPatriarchy.Where(e => e.Name.StartsWith("Th")).OrderBy(e => e.Id).ToList();

Assert.Equal(3, queried.Count);

Assert.Equal(HierarchyId.Parse("/2/1/").ToString(), queried[0].HierarchyId);
Assert.Equal("Thrór", queried[0].Name);

Assert.Equal(HierarchyId.Parse("/2/2/").ToString(), queried[1].HierarchyId);
Assert.Equal("Thráin II", queried[1].Name);

Assert.Equal(HierarchyId.Parse("/3/1/").ToString(), queried[2].HierarchyId);
Assert.Equal("Thorin Oakenshield", queried[2].Name);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore.Metadata;
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.SqlServer.Metadata.Internal;
using System;

namespace Microsoft.EntityFrameworkCore.SqlServer.Test.Models.Migrations
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Data;
using System.Data.Common;
Expand All @@ -9,6 +6,9 @@
using System.Linq.Expressions;
using System.Reflection;
using System.Threading;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Storage;

namespace Microsoft.EntityFrameworkCore.SqlServer.Storage
{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The following table show which version of this library to use with which version

| EF Core | Version to use |
| ------- | --------------- |
| 6.0 | 3.x |
| 5.0 | 2.x |
| 3.1 | 1.x |
| 2.1 | (not supported) |

Usage
-----
Expand Down

0 comments on commit f269397

Please sign in to comment.