Skip to content
Closed
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 @@ -71,8 +71,9 @@ public static IServiceCollection AddRelational([NotNull] this IServiceCollection
.AddScoped<IRelationalCommandBuilderFactory, RelationalCommandBuilderFactory>()
.AddScoped<IRawSqlCommandBuilder, RawSqlCommandBuilder>()
.AddScoped<CommandBatchPreparer>()
.AddScoped<IMigrationsModelDiffer, MigrationsModelDiffer>()
.AddScoped<MigrationsModelDiffer>()
.AddScoped<MigrationsSqlGenerator>()
.AddScoped(p => GetProviderServices(p).MigrationsModelDiffer)
.AddScoped(p => GetProviderServices(p).ParameterNameGeneratorFactory)
.AddScoped(p => GetProviderServices(p).SqlGenerationHelper)
.AddScoped(p => GetProviderServices(p).CompositeMethodCallTranslator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,10 @@ public interface IRelationalDatabaseProviderServices : IDatabaseProviderServices
/// The <see cref="IQuerySqlGeneratorFactory"/> for the provider.
/// </summary>
IQuerySqlGeneratorFactory QuerySqlGeneratorFactory { get; }

/// <summary>
/// The <see cref="IMigrationsModelDiffer"/> for the provider.
/// </summary>
IMigrationsModelDiffer MigrationsModelDiffer { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations.Internal;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Query.ExpressionTranslators;
using Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.Internal;
using Microsoft.EntityFrameworkCore.Query.ExpressionVisitors;
using Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal;
using Microsoft.EntityFrameworkCore.Query.Internal;
using Microsoft.EntityFrameworkCore.Query.Sql;
using Microsoft.EntityFrameworkCore.Update;
Expand All @@ -31,7 +30,7 @@ namespace Microsoft.EntityFrameworkCore.Storage
public abstract class RelationalDatabaseProviderServices : DatabaseProviderServices, IRelationalDatabaseProviderServices
{
/// <summary>
/// Initializes a new instance of the <see cref="RelationalDatabaseProviderServices"/> class.
/// Initializes a new instance of the <see cref="RelationalDatabaseProviderServices" /> class.
/// </summary>
/// <param name="services"> The service provider to resolve services from. </param>
protected RelationalDatabaseProviderServices([NotNull] IServiceProvider services)
Expand Down Expand Up @@ -139,6 +138,11 @@ protected RelationalDatabaseProviderServices([NotNull] IServiceProvider services
/// </summary>
public virtual IExpressionFragmentTranslator CompositeExpressionFragmentTranslator => GetService<RelationalCompositeExpressionFragmentTranslator>();

/// <summary>
/// The <see cref="IMigrationsModelDiffer" /> for the database provider.
/// </summary>
public virtual IMigrationsModelDiffer MigrationsModelDiffer => GetService<MigrationsModelDiffer>();

/// <summary>
/// Gets the <see cref="IMethodCallTranslator" /> for the database provider.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public override void Services_wire_up_correctly()
VerifyScoped<RelationalValueGeneratorSelector>();
VerifyScoped<CommandBatchPreparer>();
VerifyScoped<RelationalModelValidator>();
VerifyScoped<MigrationsModelDiffer>();

VerifyScoped<IMethodCallTranslator>();
VerifyScoped<IMemberTranslator>();
Expand Down