Skip to content

Commit

Permalink
CR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewaters committed Mar 17, 2015
1 parent 23d407f commit c476c57
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/EntityFramework.Core/DbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private DbContextServices InitializeServices(IServiceProvider serviceProvider, D

_loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
_logger = _loggerFactory.CreateLogger<DbContext>();
_logger.LogDebug(Strings.DebugLogWarning);
_logger.LogDebug(Strings.DebugLogWarning(nameof(LogLevel.Debug), nameof(ILoggerFactory) + "." + nameof(ILoggerFactory.MinimumLevel), nameof(LogLevel) + "." + nameof(LogLevel.Verbose)));

var scopedServiceProvider = serviceProvider
.GetRequiredService<IServiceScopeFactory>()
Expand Down
6 changes: 3 additions & 3 deletions src/EntityFramework.Core/Properties/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/EntityFramework.Core/Properties/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,12 @@
<value>The navigation property '{navigation}' cannot be used for both ends of the relationship. Either specify it on the principal side or the dependent side.</value>
</data>
<data name="DebugLogWarning" xml:space="preserve">
<value>Debug level logging is enabled. At this level, Entity Framework will log sensitive application data such as SQL parameter values. To hide this information configure ILoggerFactory.MinimumLevel to LogLevel.Verbose</value>
<value>{debug} level logging is enabled. At this level, Entity Framework will log sensitive application data such as SQL parameter values. To hide this information configure {minimumLevel} to {recommendedLevel}</value>
</data>
<data name="WrongGenericPropertyType" xml:space="preserve">
<value>Property '{propertyName}' on entity type '{entityType}' is of type '{actualType}' but the generic type provided is of type '{genericType}'.</value>
</data>
<data name="NonGenericOptions" xml:space="preserve">
<value>The DbContextOptions object registered in the service provider must be a DbContextOptions&lt;TContext&gt; where TContext is the type of the DbContext being used.</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var customers
.ToList();

Assert.NotNull(customers);
Assert.Equal(Internal.Strings.DebugLogWarning + @"
Assert.Equal(Internal.Strings.DebugLogWarning(nameof(LogLevel.Debug), nameof(ILoggerFactory) + "." + nameof(ILoggerFactory.MinimumLevel), nameof(LogLevel) + "." + nameof(LogLevel.Verbose)) + @"
Compiling query model: 'value(Microsoft.Data.Entity.Query.EntityQueryable`1[Microsoft.Data.Entity.FunctionalTests.TestModels.Northwind.Customer])'
Optimized query model: 'value(Microsoft.Data.Entity.Query.EntityQueryable`1[Microsoft.Data.Entity.FunctionalTests.TestModels.Northwind.Customer])'
Tracking query sources: [<generated>_0]
Expand All @@ -42,14 +42,14 @@ public virtual void Queryable_with_parameter()
{
using (var context = CreateContext())
{
var cities = new [] { "Seattle", "Redmond"};
var cities = new[] { "Seattle", "Redmond" };

foreach (var city in cities)
{
var customers
= context.Customers.Where(c => c.City == city).ToList();
}
Assert.Contains(Internal.Strings.DebugLogWarning, TestSqlLoggerFactory.Log);
Assert.Contains(Internal.Strings.DebugLogWarning(nameof(LogLevel.Debug), nameof(ILoggerFactory) + "." + nameof(ILoggerFactory.MinimumLevel), nameof(LogLevel) + "." + nameof(LogLevel.Verbose)), TestSqlLoggerFactory.Log);
Assert.Equal(@"__city_0: Seattle
SELECT [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[CustomerID], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
Expand All @@ -76,7 +76,7 @@ var customers
.ToList();

Assert.NotNull(customers);
Assert.Equal(Internal.Strings.DebugLogWarning + @"
Assert.Equal(Internal.Strings.DebugLogWarning(nameof(LogLevel.Debug), nameof(ILoggerFactory) + "." + nameof(ILoggerFactory.MinimumLevel), nameof(LogLevel) + "." + nameof(LogLevel.Verbose)) + @"
Compiling query model: 'value(Microsoft.Data.Entity.Query.EntityQueryable`1[Microsoft.Data.Entity.FunctionalTests.TestModels.Northwind.Customer]) => Include([c].Orders)'
Optimized query model: 'value(Microsoft.Data.Entity.Query.EntityQueryable`1[Microsoft.Data.Entity.FunctionalTests.TestModels.Northwind.Customer])'
Including navigation: 'Microsoft.Data.Entity.FunctionalTests.TestModels.Northwind.Customer.Orders'
Expand Down

0 comments on commit c476c57

Please sign in to comment.