Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
18c9766
Upgrade TargetFramework to net5.0 and VersionPrefix
philip-shishov Jan 9, 2021
f2a0bc7
1. app.UseDatabaseErrorPage -> services.AddDatabaseDeveloperPageExcep…
philip-shishov Jan 9, 2021
a7205f6
Update netstandard2.0 to 2.1
philip-shishov Jan 9, 2021
1a00cd1
Merge branch 'development' into version-5.0
vaptsarov May 15, 2021
dafbd0e
Updated version prefix to 5.0.0
ivaylokenov Jul 9, 2021
7824f5a
Fixed all failing tests after updating ASP.NET Core to version 5.0
ivaylokenov Jul 9, 2021
c3eef39
Updated all packages to their latest stable version
ivaylokenov Jul 9, 2021
545ae35
Fixed various styling errors
ivaylokenov Jul 9, 2021
bf42979
Added a value provider for pipeline tests - one which ignores the val…
ivaylokenov Jul 12, 2021
a569575
DbContext can now be registered and used through an interface during …
ivaylokenov Jul 13, 2021
ab16a0f
Added built-in support for Razor runtime compilation (closes #377, cl…
ivaylokenov Jul 29, 2021
948cba8
Removed licensing validation with a quick and dirty solution
ivaylokenov Jul 29, 2021
0fbc23c
removed language specific dependency on certain tests
LetMeSleepAlready Nov 20, 2021
517d129
Merge pull request #396 Removed Language Specific Dependency On Certa…
ivaylokenov Nov 24, 2021
14fe474
Upgrade TargetFramework to net6.0 and VersionPrefix to 6.0.0
kalintsenkov Mar 11, 2022
8c8ed95
Updated all packages to their latest stable version and improved Newt…
kalintsenkov Mar 11, 2022
7b09040
Updated version prefix to 6.0
kalintsenkov Mar 11, 2022
7427dcd
Changed from OptionsManager<> to the new UnnamedOptionsManager<>
kalintsenkov Dec 28, 2022
d72c133
Changed copyright year
kalintsenkov Dec 28, 2022
466e09c
Resolved conflicts
kalintsenkov Dec 28, 2022
7a08270
Updated .appveyor.yml
kalintsenkov Dec 28, 2022
ec7c0bc
Updated .travis.yml
kalintsenkov Dec 28, 2022
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
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branches:
- master
- development
- ^version-.*$
image: Visual Studio 2019
image: Visual Studio 2022
configuration: Release
clone_depth: 1
before_build:
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ git:
depth: 10
group: travis_latest
sudo: required
dotnet: 3.1
dotnet: 6.0
solution: MyTested.AspNetCore.Mvc.sln
env:
global:
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- NET_CORE_VERSION: netcoreapp3.1
- NET_CORE_VERSION: net6.0
matrix:
fast_finish: true
include:
- os: linux
dist: xenial
- os: osx
dotnet: 3.1.100
dotnet: 6.0.101
osx_image: xcode11.2
branches:
only:
Expand Down
16 changes: 15 additions & 1 deletion MyTested.AspNetCore.Mvc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApplication", "samples\C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.MultipleEntryPoints", "samples\Configuration\Test.MultipleEntryPoints\Test.MultipleEntryPoints.csproj", "{840C7C04-90CC-4F0F-BDF9-0D97D399BA3F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common", "samples\Configuration\Common\Common.csproj", "{AC971EBF-48A1-47C1-B61F-CF97FCE4F48C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdditionalEntryPoint", "samples\Configuration\Common\AdditionalEntryPoint.csproj", "{AC971EBF-48A1-47C1-B61F-CF97FCE4F48C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyTested.AspNetCore.Mvc.Versioning", "plugins\MyTested.AspNetCore.Mvc.Versioning\MyTested.AspNetCore.Mvc.Versioning.csproj", "{3529E0FC-4D63-4828-A3DC-ACE7B6243A73}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyTested.AspNetCore.Mvc.Versioning.Test", "test\MyTested.AspNetCore.Mvc.Versioning.Test\MyTested.AspNetCore.Mvc.Versioning.Test.csproj", "{6541FC98-C8B1-48CF-A3A5-7028B19455E8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation", "plugins\MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation\MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj", "{A9353C8C-3EF6-4677-B4D3-8BEB350AC0B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation.Test", "test\MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation.Test\MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation.Test.csproj", "{A40A442E-E39B-4EA5-839A-3893AD66A700}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -619,6 +623,14 @@ Global
{6541FC98-C8B1-48CF-A3A5-7028B19455E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6541FC98-C8B1-48CF-A3A5-7028B19455E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6541FC98-C8B1-48CF-A3A5-7028B19455E8}.Release|Any CPU.Build.0 = Release|Any CPU
{A9353C8C-3EF6-4677-B4D3-8BEB350AC0B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9353C8C-3EF6-4677-B4D3-8BEB350AC0B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9353C8C-3EF6-4677-B4D3-8BEB350AC0B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9353C8C-3EF6-4677-B4D3-8BEB350AC0B0}.Release|Any CPU.Build.0 = Release|Any CPU
{A40A442E-E39B-4EA5-839A-3893AD66A700}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A40A442E-E39B-4EA5-839A-3893AD66A700}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A40A442E-E39B-4EA5-839A-3893AD66A700}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A40A442E-E39B-4EA5-839A-3893AD66A700}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -729,6 +741,8 @@ Global
{AC971EBF-48A1-47C1-B61F-CF97FCE4F48C} = {7BEC9808-8650-4322-BCC6-1D7D91B53678}
{3529E0FC-4D63-4828-A3DC-ACE7B6243A73} = {EF386110-3D7B-4BDF-B403-8DC2AB8CF7BB}
{6541FC98-C8B1-48CF-A3A5-7028B19455E8} = {D140FA14-A6C2-4279-8A41-35BC55279DA8}
{A9353C8C-3EF6-4677-B4D3-8BEB350AC0B0} = {EF386110-3D7B-4BDF-B403-8DC2AB8CF7BB}
{A40A442E-E39B-4EA5-839A-3893AD66A700} = {D140FA14-A6C2-4279-8A41-35BC55279DA8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {99A2DEDD-5195-4EE6-A546-B1CA54C5539F}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<Description>My Tested ASP.NET Core MVC Newtonsoft JSON components.</Description>
<Copyright>2015-2019 Ivaylo Kenov</Copyright>
<Copyright>2015-2022 Ivaylo Kenov</Copyright>
<AssemblyTitle>MyTested.AspNetCore.Mvc.NewtonsoftJson</AssemblyTitle>
<VersionPrefix>3.1.3</VersionPrefix>
<VersionPrefix>6.0.0</VersionPrefix>
<Authors>Ivaylo Kenov</Authors>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -29,7 +29,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace MyTested.AspNetCore.Mvc.Internal.Razor
{
using Microsoft.Extensions.Primitives;
using System;

public class ChangeTokenMock : IChangeToken
{
public static ChangeTokenMock Instance => new ChangeTokenMock();

public bool ActiveChangeCallbacks => false;

public bool HasChanged => false;

public IDisposable RegisterChangeCallback(Action<object> callback, object state) => DisposableMock.Instance;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace MyTested.AspNetCore.Mvc.Internal.Razor
{
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.Primitives;

public class TestActionDescriptorChangeProvider : IActionDescriptorChangeProvider
{
public IChangeToken GetChangeToken() => ChangeTokenMock.Instance;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>My Tested ASP.NET Core MVC razor runtime compilation components.</Description>
<Copyright>2015-2022 Ivaylo Kenov</Copyright>
<AssemblyTitle>MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation</AssemblyTitle>
<VersionPrefix>6.0.0</VersionPrefix>
<Authors>Ivaylo Kenov</Authors>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation</AssemblyName>
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>MyTested.AspNetCore.Mvc.Razor.RuntimeCompilation</PackageId>
<PackageTags>aspnetcore;aspnetcoremvc;testing;unit;tests;fluent;testing;framework;asp;net;core;mvc;test;mymvc;mytested</PackageTags>
<PackageIcon>nuget-logo.png</PackageIcon>
<PackageProjectUrl>https://mytestedasp.net/</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc</RepositoryUrl>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace>MyTested.AspNetCore.Mvc</RootNamespace>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.3" />
</ItemGroup>

<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<None Include="../../tools/nuget-logo.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\MyTested.AspNetCore.Mvc.ViewFeatures\MyTested.AspNetCore.Mvc.ViewFeatures.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace MyTested.AspNetCore.Mvc.Plugins
{
using System;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.DependencyInjection;

public class RazorRuntimeCompilationTestPlugin : IServiceRegistrationPlugin
{
private readonly Type defaultActionDescriptorChangeProviderServiceType = typeof(IActionDescriptorChangeProvider);

public Func<ServiceDescriptor, bool> ServiceSelectorPredicate
=> serviceDescriptor => serviceDescriptor.ServiceType == this.defaultActionDescriptorChangeProviderServiceType;

public Action<IServiceCollection> ServiceRegistrationDelegate
=> serviceCollection => serviceCollection.ReplaceRazorRuntimeCompilation();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace MyTested.AspNetCore.Mvc
{
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using MyTested.AspNetCore.Mvc.Internal.Razor;

/// <summary>
/// Contains Razor runtime compilation extension methods for <see cref="IServiceCollection"/>.
/// </summary>
public static class ServiceCollectionRazorRuntimeCompilationExtensions
{
/// <summary>
/// Replaces the default <see cref="IActionDescriptorChangeProvider"/> with a mocked implementation..
/// </summary>
/// <param name="serviceCollection">Instance of <see cref="IServiceCollection"/> type.</param>
/// <returns>The same <see cref="IServiceCollection"/>.</returns>
public static IServiceCollection ReplaceRazorRuntimeCompilation(this IServiceCollection serviceCollection)
=> serviceCollection
.Remove<IActionDescriptorProvider, PageActionDescriptorProvider>()
.ReplaceSingleton<IActionDescriptorChangeProvider, TestActionDescriptorChangeProvider>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<Description>My Tested ASP.NET Core MVC versioning components.</Description>
<Copyright>2015-2019 Ivaylo Kenov</Copyright>
<Copyright>2015-2022 Ivaylo Kenov</Copyright>
<AssemblyTitle>MyTested.AspNetCore.Mvc.Versioning</AssemblyTitle>
<VersionPrefix>3.1.3</VersionPrefix>
<VersionPrefix>6.0.0</VersionPrefix>
<Authors>Ivaylo Kenov</Authors>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -29,7 +29,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>ApplicationParts.Controllers</AssemblyName>
<PackageId>ApplicationParts.Controllers</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
Expand All @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>ApplicationParts.Models</AssemblyName>
<PackageId>ApplicationParts.Models</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
Expand All @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>ApplicationParts.Services</AssemblyName>
<PackageId>ApplicationParts.Services</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

Expand All @@ -15,9 +15,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>ApplicationParts.Web</AssemblyName>
<UserSecretsId>aspnet-ApplicationParts.Web-c273a372-79ef-490d-b0e1-a7fb8f2dacc7</UserSecretsId>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>ApplicationParts.Web</AssemblyName>
<UserSecretsId>aspnet-ApplicationParts.Web-c273a372-79ef-490d-b0e1-a7fb8f2dacc7</UserSecretsId>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<None Update="wwwroot\**\*;Views\**\*">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="wwwroot\**\*;Views\**\*">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ApplicationParts.Controllers\ApplicationParts.Controllers.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ApplicationParts.Controllers\ApplicationParts.Controllers.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion samples/ApplicationParts/ApplicationParts.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ public void ConfigureServices(IServiceCollection services)

services.AddTransient<IEmailSender, AuthMessageSender>();
services.AddTransient<ISmsSender, AuthMessageSender>();

services.AddDatabaseDeveloperPageExceptionFilter();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
}
else
{
Expand Down
Loading