Skip to content

Commit 1687e66

Browse files
committed
Upgrade to .NET 8.0.200
1 parent 0ecc36c commit 1687e66

File tree

9 files changed

+110
-13
lines changed

9 files changed

+110
-13
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v4
1212
- name: Setup .NET Core
13-
uses: actions/setup-dotnet@v1
13+
uses: actions/setup-dotnet@v3
1414
with:
15-
dotnet-version: 7.0.306
15+
dotnet-version: 8.0.x
1616
- name: Build DNTIdentity
1717
run: dotnet build ./src/ASPNETCoreIdentitySample/ASPNETCoreIdentitySample.csproj --configuration Release

.github/workflows/codeql.yml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "master" ]
20+
21+
jobs:
22+
analyze:
23+
name: Analyze
24+
# Runner size impacts CodeQL analysis time. To learn more, please see:
25+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
26+
# - https://gh.io/supported-runners-and-hardware-resources
27+
# - https://gh.io/using-larger-runners
28+
# Consider using larger runners for possible analysis time improvements.
29+
runs-on: windows-2019
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
language: [ 'csharp' ]
39+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
40+
# Use only 'java' to analyze code written in Java, Kotlin or both
41+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
42+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
# Initializes the CodeQL tools for scanning.
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@v2
51+
with:
52+
languages: ${{ matrix.language }}
53+
config-file: ./.github/workflows/codeql/codeql-config.yml
54+
# If you wish to specify custom queries, you can do so here or in a config file.
55+
# By default, queries listed here will override any specified in a config file.
56+
# Prefix the list here with "+" to use these queries and those in the config file.
57+
58+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
59+
# queries: security-extended,security-and-quality
60+
61+
62+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
63+
# If this step fails, then you should remove it and run the build manually (see below)
64+
# - name: Autobuild
65+
# uses: github/codeql-action/autobuild@v2
66+
- name: Setup .NET
67+
uses: actions/setup-dotnet@v3
68+
with:
69+
dotnet-version: 8.0.x
70+
- name: Build
71+
run: dotnet build --configuration Release
72+
73+
# ℹ️ Command-line programs to run using the OS shell.
74+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
75+
76+
# If the Autobuild fails above, remove it and uncomment the following three lines.
77+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
78+
79+
# - run: |
80+
# echo "Run, Build Application using script"
81+
# ./location_of_script_within_repo/buildscript.sh
82+
83+
- name: Perform CodeQL Analysis
84+
uses: github/codeql-action/analyze@v2
85+
with:
86+
category: "/language:${{matrix.language}}"
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Security and Quality"
2+
3+
queries:
4+
- uses: security-and-quality
5+
6+
query-filters:
7+
- exclude:
8+
id: cs/useless-if-statement
9+
- exclude:
10+
id: cs/empty-block

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div dir="rtl">
22

3-
# سفارشی سازی ASP.NET Core Identity SDK-7.0.306
3+
# سفارشی سازی ASP.NET Core Identity SDK-8.0.200
44

55
<p>
66
<a href="https://github.com/VahidN/DNTIdentity">

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0",
3+
"version": "8.0.200",
44
"rollForward": "latestMajor",
55
"allowPrerelease": false
66
}

src/ASPNETCoreIdentitySample.DataLayer.MSSQL/_01-add_migrations.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ For /f "tokens=1-2 delims=/:" %%a in ("%TIME: =0%") do (set mytime=%%a%%b)
33
dotnet tool update --global dotnet-ef --version 7.0.8
44
dotnet tool restore
55
dotnet build
6-
dotnet ef migrations --startup-project ../ASPNETCoreIdentitySample/ add V%mydate%_%mytime% --context MsSqlDbContext
6+
dotnet ef --verbose migrations --startup-project ../ASPNETCoreIdentitySample/ add V%mydate%_%mytime% --context MsSqlDbContext
77
pause
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dotnet tool update --global dotnet-ef --version 7.0.8
22
dotnet tool restore
33
dotnet build
4-
dotnet ef --startup-project ../ASPNETCoreIdentitySample/ database update --context MsSqlDbContext
4+
dotnet ef --verbose --startup-project ../ASPNETCoreIdentitySample/ database update --context MsSqlDbContext
55
pause

src/ASPNETCoreIdentitySample.DataLayer/Context/AuditableEntitiesInterceptor.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public override InterceptionResult<int> SavingChanges(
2626
DbContextEventData eventData,
2727
InterceptionResult<int> result)
2828
{
29-
if (eventData == null)
29+
if (eventData?.Context is null)
3030
{
31-
throw new ArgumentNullException(nameof(eventData));
31+
return result;
3232
}
3333

3434
BeforeSaveTriggers(eventData.Context);
@@ -40,9 +40,9 @@ public override ValueTask<InterceptionResult<int>> SavingChangesAsync(
4040
InterceptionResult<int> result,
4141
CancellationToken cancellationToken = default)
4242
{
43-
if (eventData == null)
43+
if (eventData?.Context is null)
4444
{
45-
throw new ArgumentNullException(nameof(eventData));
45+
return ValueTask.FromResult(result);
4646
}
4747

4848
BeforeSaveTriggers(eventData.Context);

src/ASPNETCoreIdentitySample/appsettings.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"AttachDbFilename": "TestASPNETCore70100IdentityDb.mdf"
5555
},
5656
"SQLite": {
57-
"ApplicationDbContextConnection": "Data Source=|DataDirectory|\\TestASPNETCore70100IdentityDb.sqlite"
57+
"ApplicationDbContextConnection": "Data Source=|DataDirectory|\\TestASPNETCore70100IdentityDb.sqlite;Cache=Shared"
5858
}
5959
},
6060
"EnableEmailConfirmation": true,
@@ -136,7 +136,8 @@
136136
"balochmail.ir",
137137
"turkmenmail.ir",
138138
".ru",
139-
"azmeil.tk"
139+
"azmeil.tk",
140+
"chapar.cf"
140141
],
141142
"PasswordsBanList": [
142143
"password",

0 commit comments

Comments
 (0)