UPDATED DEPENDENCIES (also removed warning / uneeded code in startup.cs no longer required)
This commit is contained in:
@@ -43,8 +43,8 @@ nav:
|
||||
- 'Notification subscriptions': 'form-home-notify-subscriptions.md'
|
||||
- 'Notifications list': 'form-home-notifications.md'
|
||||
- Customers:
|
||||
- 'Customers': 'form-cust-customers.md'
|
||||
- 'Head offices': 'form-cust-head-offices.md'
|
||||
- 'Customers': 'form-customers.md'
|
||||
- 'Head offices': 'form-head-offices.md'
|
||||
- Service:
|
||||
- 'Schedule': 'form-svc-schedule.md'
|
||||
- 'Workorders': 'form-svc-workorders.md'
|
||||
@@ -93,7 +93,7 @@ nav:
|
||||
- Customer:
|
||||
- 'Workorders': 'form-customer-workorders.md'
|
||||
- 'Customer service requests': 'form-customer-csr-list.md'
|
||||
- 'Widget (testing)': 'form-widget.md'
|
||||
- 'Widgets (testing)': 'form-widgets.md'
|
||||
- Features:
|
||||
- 'Translation': 'ay-translation.md'
|
||||
- 'Notification': 'ay-notification.md'
|
||||
|
||||
@@ -15,28 +15,28 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bogus" Version="31.0.3" />
|
||||
<PackageReference Include="Bogus" Version="32.0.2" />
|
||||
<PackageReference Include="BouncyCastle.NetCore" Version="1.8.8" />
|
||||
<PackageReference Include="ChoETL.JSON.NETStandard" Version="1.2.1.3" />
|
||||
<PackageReference Include="ChoETL.JSON.NETStandard" Version="1.2.1.5" />
|
||||
<PackageReference Include="Enums.NET" Version="3.0.3" />
|
||||
<PackageReference Include="jose-jwt" Version="2.6.1" />
|
||||
<PackageReference Include="MailKit" Version="2.9.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0" />
|
||||
<PackageReference Include="jose-jwt" Version="3.0.0" />
|
||||
<PackageReference Include="MailKit" Version="2.10.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0-preview.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0-preview.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="5.0.0">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="5.0.1">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.OpenApi" Version="1.2.3" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.1" />
|
||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.2.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.5" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
|
||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.2.22" />
|
||||
<PackageReference Include="NLog" Version="4.7.6" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.3" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0-rc.2.*" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.1" />
|
||||
<PackageReference Include="PuppeteerSharp" Version="2.0.4" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.6.3" />
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace AyaNova
|
||||
_newLog = nlogLoggerProvider.CreateLogger("SERVER");
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
AyaNova.Util.ApplicationLogging.LoggerProvider = nlogLoggerProvider;
|
||||
ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH = hostingEnvironment.ContentRootPath;
|
||||
ServerBootConfig.SEEDING=false;
|
||||
ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH = hostingEnvironment.ContentRootPath;
|
||||
ServerBootConfig.SEEDING = false;
|
||||
}
|
||||
|
||||
private readonly ILogger _newLog;
|
||||
@@ -159,17 +159,31 @@ namespace AyaNova
|
||||
|
||||
_newLog.LogDebug("EF Core");
|
||||
|
||||
services.AddEntityFrameworkNpgsql().AddDbContext<AyContext>(
|
||||
options => options.UseNpgsql(_connectionString
|
||||
//,opt => opt.EnableRetryOnFailure()//REMOVED THIS BECAUSE IT WAS INTEFERING WITH TRANSACTIONS BUT THEN DIDN'T USE THE TRANSACTION BUT IT SEEMS FASTER WITHOUT IT AS WELL SO...??
|
||||
)//http://www.npgsql.org/efcore/misc.html?q=execution%20strategy#execution-strategy
|
||||
.ConfigureWarnings(warnings => //https://livebook.manning.com/#!/book/entity-framework-core-in-action/chapter-12/v-10/85
|
||||
warnings.Throw( //Throw an exception on client eval, not necessarily an error but a smell
|
||||
// Microsoft.EntityFrameworkCore.Diagnostics.RelationalEventId.QueryClientEvaluationWarning
|
||||
))
|
||||
.EnableSensitiveDataLogging(LOG_SENSITIVE_DATA)
|
||||
);
|
||||
|
||||
//change to resolve error:
|
||||
//2020-12-28 09:20:14.3545|WARN|Microsoft.EntityFrameworkCore.Infrastructure|'AddEntityFramework*' was called on the service provider, but 'UseInternalServiceProvider' wasn't called in the DbContext options configuration. Consider removing the 'AddEntityFramework*' call, as in most cases it's not needed and may cause conflicts with other products and services registered in the same service provider.
|
||||
//https://stackoverflow.com/questions/62917136/addentityframework-was-called-on-the-service-provider-but-useinternalservic
|
||||
// services.AddEntityFrameworkNpgsql().AddDbContext<AyContext>(
|
||||
// options => options.UseNpgsql(_connectionString
|
||||
// //,opt => opt.EnableRetryOnFailure()//REMOVED THIS BECAUSE IT WAS INTEFERING WITH TRANSACTIONS BUT THEN DIDN'T USE THE TRANSACTION BUT IT SEEMS FASTER WITHOUT IT AS WELL SO...??
|
||||
// )//http://www.npgsql.org/efcore/misc.html?q=execution%20strategy#execution-strategy
|
||||
// .ConfigureWarnings(warnings => //https://livebook.manning.com/#!/book/entity-framework-core-in-action/chapter-12/v-10/85
|
||||
// warnings.Throw( //Throw an exception on client eval, not necessarily an error but a smell
|
||||
// // Microsoft.EntityFrameworkCore.Diagnostics.RelationalEventId.QueryClientEvaluationWarning
|
||||
// ))
|
||||
// .EnableSensitiveDataLogging(LOG_SENSITIVE_DATA)
|
||||
// );
|
||||
|
||||
services.AddDbContext<AyContext>(
|
||||
options => options.UseNpgsql(_connectionString
|
||||
//,opt => opt.EnableRetryOnFailure()//REMOVED THIS BECAUSE IT WAS INTEFERING WITH TRANSACTIONS BUT THEN DIDN'T USE THE TRANSACTION BUT IT SEEMS FASTER WITHOUT IT AS WELL SO...??
|
||||
)//http://www.npgsql.org/efcore/misc.html?q=execution%20strategy#execution-strategy
|
||||
.ConfigureWarnings(warnings => //https://livebook.manning.com/#!/book/entity-framework-core-in-action/chapter-12/v-10/85
|
||||
warnings.Throw( //Throw an exception on client eval, not necessarily an error but a smell
|
||||
// Microsoft.EntityFrameworkCore.Diagnostics.RelationalEventId.QueryClientEvaluationWarning
|
||||
))
|
||||
.EnableSensitiveDataLogging(LOG_SENSITIVE_DATA)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user