Skip to content

Commit

Permalink
Upgrade to .NET 8.0.200
Browse files Browse the repository at this point in the history
  • Loading branch information
VahidN committed Mar 2, 2024
1 parent 0ecc36c commit 1687e66
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.306
dotnet-version: 8.0.x
- name: Build DNTIdentity
run: dotnet build ./src/ASPNETCoreIdentitySample/ASPNETCoreIdentitySample.csproj --configuration Release
86 changes: 86 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: windows-2019
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/workflows/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# 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
# queries: security-extended,security-and-quality


# 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: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build --configuration Release

# ℹ️ 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

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
10 changes: 10 additions & 0 deletions .github/workflows/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Security and Quality"

queries:
- uses: security-and-quality

query-filters:
- exclude:
id: cs/useless-if-statement
- exclude:
id: cs/empty-block
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div dir="rtl">

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

<p>
<a href="https://github.com/VahidN/DNTIdentity">
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0",
"version": "8.0.200",
"rollForward": "latestMajor",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ For /f "tokens=1-2 delims=/:" %%a in ("%TIME: =0%") do (set mytime=%%a%%b)
dotnet tool update --global dotnet-ef --version 7.0.8
dotnet tool restore
dotnet build
dotnet ef migrations --startup-project ../ASPNETCoreIdentitySample/ add V%mydate%_%mytime% --context MsSqlDbContext
dotnet ef --verbose migrations --startup-project ../ASPNETCoreIdentitySample/ add V%mydate%_%mytime% --context MsSqlDbContext
pause
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dotnet tool update --global dotnet-ef --version 7.0.8
dotnet tool restore
dotnet build
dotnet ef --startup-project ../ASPNETCoreIdentitySample/ database update --context MsSqlDbContext
dotnet ef --verbose --startup-project ../ASPNETCoreIdentitySample/ database update --context MsSqlDbContext
pause
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public override InterceptionResult<int> SavingChanges(
DbContextEventData eventData,
InterceptionResult<int> result)
{
if (eventData == null)
if (eventData?.Context is null)
{
throw new ArgumentNullException(nameof(eventData));
return result;
}

BeforeSaveTriggers(eventData.Context);
Expand All @@ -40,9 +40,9 @@ public override ValueTask<InterceptionResult<int>> SavingChangesAsync(
InterceptionResult<int> result,
CancellationToken cancellationToken = default)
{
if (eventData == null)
if (eventData?.Context is null)
{
throw new ArgumentNullException(nameof(eventData));
return ValueTask.FromResult(result);
}

BeforeSaveTriggers(eventData.Context);
Expand Down
5 changes: 3 additions & 2 deletions src/ASPNETCoreIdentitySample/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"AttachDbFilename": "TestASPNETCore70100IdentityDb.mdf"
},
"SQLite": {
"ApplicationDbContextConnection": "Data Source=|DataDirectory|\\TestASPNETCore70100IdentityDb.sqlite"
"ApplicationDbContextConnection": "Data Source=|DataDirectory|\\TestASPNETCore70100IdentityDb.sqlite;Cache=Shared"
}
},
"EnableEmailConfirmation": true,
Expand Down Expand Up @@ -136,7 +136,8 @@
"balochmail.ir",
"turkmenmail.ir",
".ru",
"azmeil.tk"
"azmeil.tk",
"chapar.cf"
],
"PasswordsBanList": [
"password",
Expand Down

0 comments on commit 1687e66

Please sign in to comment.