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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageId>AutoMapper.AspNetCore.OData.EF6</PackageId>
<Description>Creates LINQ expressions from ODataQueryOptions and executes the query.</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>Supporting AutoMapper v14 (EF Core only).</PackageReleaseNotes>
<PackageReleaseNotes>Supporting AutoMapper v15 (EF Core only).</PackageReleaseNotes>
<PackageTags>linq expressions odata efcore</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/AutoMapper/AutoMapper.Extensions.OData</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageId>AutoMapper.AspNetCore.OData.EFCore</PackageId>
<Description>Creates LINQ expressions from ODataQueryOptions and executes the query.</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>Supporting AutoMapper v14 (EF Core only).</PackageReleaseNotes>
<PackageReleaseNotes>Supporting AutoMapper v15 (EF Core only).</PackageReleaseNotes>
<PackageTags>linq expressions odata efcore</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/AutoMapper/AutoMapper.Extensions.OData</RepositoryUrl>
Expand All @@ -30,7 +30,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.ExpressionMapping" Version="[8.0.0,9.0.0)" />
<PackageReference Include="AutoMapper.Extensions.ExpressionMapping" Version="[9.0.0,10.0.0)" />
<PackageReference Include="LogicBuilder.Expressions.Utils" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.1.1" />
<PackageReference Include="MinVer" Version="6.0.0">
Expand Down
3 changes: 2 additions & 1 deletion AutoMapper.OData.EFCore.Tests/ExpansionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.AspNetCore.OData.Query;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -217,7 +218,7 @@ public ExpansionTestsFixture()
),
ServiceLifetime.Transient
)
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly)))
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly), new NullLoggerFactory()))
.AddTransient<IMapper>(sp => new Mapper(sp.GetRequiredService<IConfigurationProvider>(), sp.GetService))
.AddTransient<IApplicationBuilder>(sp => new ApplicationBuilder(sp))
.AddRouting()
Expand Down
3 changes: 2 additions & 1 deletion AutoMapper.OData.EFCore.Tests/GetQuerySelectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.AspNetCore.OData.Query;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -213,7 +214,7 @@ public GetQuerySelectTestsFixture()
),
ServiceLifetime.Transient
)
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly)))
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly), new NullLoggerFactory()))
.AddTransient<IMapper>(sp => new Mapper(sp.GetRequiredService<IConfigurationProvider>(), sp.GetService))
.AddTransient<IApplicationBuilder>(sp => new ApplicationBuilder(sp))
.AddRouting()
Expand Down
15 changes: 8 additions & 7 deletions AutoMapper.OData.EFCore.Tests/GetQueryTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper.AspNet.OData;
using AutoMapper.AspNet.OData;
using AutoMapper.OData.EFCore.Tests.Data;
using AutoMapper.OData.EFCore.Tests.Model;
using DAL.EFCore;
Expand All @@ -14,6 +9,12 @@
using Microsoft.AspNetCore.OData.Query;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;

namespace AutoMapper.OData.EFCore.Tests
Expand Down Expand Up @@ -1921,7 +1922,7 @@ public GetQueryTestsFixture()
),
ServiceLifetime.Transient
)
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly)))
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly), new NullLoggerFactory()))
.AddTransient<IMapper>(sp => new Mapper(sp.GetRequiredService<IConfigurationProvider>(), sp.GetService))
.AddTransient<IApplicationBuilder>(sp => new ApplicationBuilder(sp))
.AddRouting()
Expand Down
3 changes: 2 additions & 1 deletion AutoMapper.OData.EFCore.Tests/GetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Microsoft.AspNetCore.OData.Query.Expressions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.OData.Edm;
using Microsoft.OData.ModelBuilder;
using Microsoft.OData.UriParser;
Expand Down Expand Up @@ -776,7 +777,7 @@ public GetTestsFixture()
),
ServiceLifetime.Transient
)
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly)))
.AddSingleton<IConfigurationProvider>(new MapperConfiguration(cfg => cfg.AddMaps(typeof(GetTests).Assembly), new NullLoggerFactory()))
.AddTransient<IMapper>(sp => new Mapper(sp.GetRequiredService<IConfigurationProvider>(), sp.GetService))
.AddTransient<IApplicationBuilder>(sp => new ApplicationBuilder(sp))
.AddRouting()
Expand Down
3 changes: 2 additions & 1 deletion WebAPI.OData.EFCore/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.OData.Edm;
using Microsoft.OData.ModelBuilder;
using WebAPI.OData.EFCore.Binders;
Expand Down Expand Up @@ -38,7 +39,7 @@ public void ConfigureServices(IServiceCollection services)
{
cfg.AddMaps(typeof(Startup).Assembly);
cfg.AllowNullCollections = true;
})
}, new NullLoggerFactory())
)
.AddScoped<IMapper>(sp => new Mapper(sp.GetRequiredService<AutoMapper.IConfigurationProvider>(), sp.GetService));
}
Expand Down