forked from neozhu/CleanArchitectureWithBlazorServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/kirkey/CleanArchitectureWit…
- Loading branch information
Showing
565 changed files
with
6,865 additions
and
5,252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,8 @@ jobs: | |
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
# - name: Autobuild | ||
# uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
@@ -54,7 +54,17 @@ jobs: | |
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Setup .NET SDK | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore CleanArchitecture.Blazor.sln | ||
|
||
- name: Build | ||
run: dotnet build CleanArchitecture.Blazor.sln --configuration Debug --no-restore | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,32 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<RootNamespace>CleanArchitecture.Blazor.Application</RootNamespace> | ||
<AssemblyName>CleanArchitecture.Blazor.Application</AssemblyName> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Ardalis.Specification" Version="7.0.0" /> | ||
<PackageReference Include="Ardalis.Specification.EntityFrameworkCore" Version="7.0.0" /> | ||
<PackageReference Include="ClosedXML" Version="0.102.1" /> | ||
<PackageReference Include="jcamp.FluentEmail.Core" Version="3.2.0" /> | ||
<PackageReference Include="jcamp.FluentEmail.MailKit" Version="3.2.0" /> | ||
<PackageReference Include="jcamp.FluentEmail.Razor" Version="3.2.0" /> | ||
<PackageReference Include="MailKit" Version="4.2.0" /> | ||
<PackageReference Include="AutoMapper" Version="12.0.1" /> | ||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" /> | ||
<PackageReference Include="FluentValidation" Version="11.7.1" /> | ||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.7.1" /> | ||
<PackageReference Include="Fluxor.Blazor.Web" Version="5.9.1" /> | ||
<PackageReference Include="Fluxor.Blazor.Web.ReduxDevTools" Version="5.9.1" /> | ||
<PackageReference Include="LazyCache" Version="2.4.0" /> | ||
<PackageReference Include="LazyCache.AspNetCore" Version="2.4.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.12" /> | ||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.12" /> | ||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" /> | ||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.12" /> | ||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.5" /> | ||
<PackageReference Include="Hangfire.Core" Version="1.8.5" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Domain\Domain.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Common\Specification\" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RootNamespace>CleanArchitecture.Blazor.Application</RootNamespace> | ||
<AssemblyName>CleanArchitecture.Blazor.Application</AssemblyName> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>default</LangVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Ardalis.Specification" Version="8.0.0" /> | ||
<PackageReference Include="Ardalis.Specification.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageReference Include="ClosedXML" Version="0.104.0-preview2" /> | ||
<PackageReference Include="jcamp.FluentEmail.Core" Version="3.7.0" /> | ||
<PackageReference Include="jcamp.FluentEmail.MailKit" Version="3.7.0" /> | ||
<PackageReference Include="jcamp.FluentEmail.Razor" Version="3.7.0" /> | ||
<PackageReference Include="AutoMapper" Version="12.0.1" /> | ||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" /> | ||
<PackageReference Include="FluentValidation" Version="11.8.1" /> | ||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.8.1" /> | ||
<PackageReference Include="LazyCache" Version="2.4.0" /> | ||
<PackageReference Include="LazyCache.AspNetCore" Version="2.4.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0-preview3.23201.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.7" /> | ||
<PackageReference Include="Hangfire.Core" Version="1.8.6" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Domain\Domain.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using FluentValidation.Results; | ||
|
||
namespace CleanArchitecture.Blazor.Application.Common.Extensions; | ||
public static class ValidationExtensions | ||
{ | ||
public static async Task<List<ValidationFailure>> ValidateAsync<TRequest>(this IEnumerable<IValidator<TRequest>> validators, ValidationContext<TRequest> validationContext, CancellationToken cancellationToken = default) | ||
{ | ||
if (!validators.Any()) return new List<ValidationFailure>(); | ||
|
||
var validationResults = await Task.WhenAll( | ||
validators.Select(v => v.ValidateAsync(validationContext, cancellationToken))); | ||
|
||
return validationResults | ||
.SelectMany(r => r.Errors) | ||
.Where(f => f != null) | ||
.ToList(); | ||
} | ||
|
||
public static Dictionary<string, string[]> ToDictionary(this List<ValidationFailure>? failures) | ||
{ | ||
return failures != null && failures.Any() | ||
? failures.GroupBy(e => e.PropertyName, e => e.ErrorMessage) | ||
.ToDictionary(g => g.Key, g => g.ToArray()) | ||
: new Dictionary<string, string[]>(); | ||
} | ||
} |
Oops, something went wrong.