diff --git a/.github/workflows/Build-Master.yml b/.github/workflows/Build-Master.yml
index 4e1915a..63f3982 100644
--- a/.github/workflows/Build-Master.yml
+++ b/.github/workflows/Build-Master.yml
@@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
@@ -28,7 +28,7 @@ jobs:
github-token: '${{ secrets.GITHUB_TOKEN }}'
steps:
- name: Step-01 Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Step-02 Lint Code Base
diff --git a/.github/workflows/Master-CodeQL.yml b/.github/workflows/Master-CodeQL.yml
index b765a11..fd68322 100644
--- a/.github/workflows/Master-CodeQL.yml
+++ b/.github/workflows/Master-CodeQL.yml
@@ -13,64 +13,86 @@ name: "Master-CodeQL"
on:
push:
- pull_request:
- types: [opened, reopened, edited, synchronize]
- paths-ignore:
- - "**/*.md"
- - "**/*.gitignore"
- - "**/*.gitattributes"
+ branches: [ "master" ]
schedule:
- - cron: '35 15 * * 2'
+ - cron: '42 7 * * 5'
jobs:
analyze:
- name: Analyze
- runs-on: ubuntu-latest
+ name: Analyze (${{ matrix.language }})
+ # 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 (GitHub.com only)
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
+ # required for all workflows
+ security-events: write
+
+ # required to fetch internal or private CodeQL packs
+ packages: read
+
+ # only required for workflows in private repositories
actions: read
contents: read
- security-events: write
strategy:
fail-fast: false
matrix:
- language: [ 'csharp' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
+ include:
+ - language: actions
+ build-mode: none
+ - language: csharp
+ build-mode: none
+ # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
+ # Use `c-cpp` to analyze code written in C, C++ or both
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
+
+ # Add any setup steps before running the `github/codeql-action/init` action.
+ # This includes steps like installing compilers or runtimes (`actions/setup-node`
+ # or others). This is typically only required for manual builds.
+ # - name: Setup runtime (example)
+ # uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
+ build-mode: ${{ matrix.build-mode }}
# 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.
- # 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
+ # 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, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
+ # If the analyze step fails for one of the languages you are analyzing with
+ # "We were unable to automatically build your code", modify the matrix above
+ # to set the build mode to "manual" for that language. Then modify this step
+ # to build your code.
# ℹ️ 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
+ - if: matrix.build-mode == 'manual'
+ shell: bash
+ run: |
+ echo 'If you are using a "manual" build mode for one or more of the' \
+ 'languages you are analyzing, replace this with the commands to build' \
+ 'your code, for example:'
+ echo ' make bootstrap'
+ echo ' make release'
+ exit 1
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
with:
- category: "/language:${{matrix.language}}"
\ No newline at end of file
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/PullRequest-CI.yml b/.github/workflows/PullRequest-CI.yml
index c3c8441..2ecea02 100644
--- a/.github/workflows/PullRequest-CI.yml
+++ b/.github/workflows/PullRequest-CI.yml
@@ -39,7 +39,7 @@ jobs:
versionSpec: 5.x
- name: Step-02 Check out Code
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
@@ -59,12 +59,12 @@ jobs:
working-directory: '${{ env.working-directory }}'
- name: Step-06 Build Version (Beta)
- if: ${{ !startsWith(github.head_ref, 'release/')}}
+ if: ('!startsWith(github.ref, ''refs/heads/release'')')
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
working-directory: '${{ env.working-directory }}'
- name: Step-06 Build Version (Release)
- if: ${{ startsWith(github.head_ref, 'release/')}}
+ if: ('startsWith(github.ref, ''refs/heads/release'')')
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
working-directory: '${{ env.working-directory }}'
@@ -73,7 +73,7 @@ jobs:
working-directory: '${{ env.working-directory }}'
- name: Step-08 Upload Build Artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: build-artifact
path: ${{env.working-directory}}
@@ -90,7 +90,7 @@ jobs:
working-directory: /home/runner/work/Schemio/Schemio
steps:
- name: Step-01 Retrieve Build Artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build-artifact
path: ${{env.working-directory}}
@@ -104,14 +104,14 @@ jobs:
Release:
name: Release to Nuget
needs: [Package]
- if: ${{ startsWith(github.head_ref, 'release/')}}
+ if: ('startsWith(github.ref, ''refs/heads/release'')')
runs-on: ubuntu-latest
env:
github-token: '${{ secrets.GH_Packages }}'
nuget-token: '${{ secrets.NUGET_API_KEY }}'
working-directory: /home/runner/work/Schemio/Schemio
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
# - name: Setup dotnet
# uses: actions/setup-dotnet@v1
diff --git a/.github/workflows/PullRequest-CodeQL.yml b/.github/workflows/PullRequest-CodeQL.yml
index 741c609..7dcf2f5 100644
--- a/.github/workflows/PullRequest-CodeQL.yml
+++ b/.github/workflows/PullRequest-CodeQL.yml
@@ -12,65 +12,91 @@
name: "PullRequest-CodeQL"
on:
- push:
pull_request:
types: [opened, reopened, edited, synchronize]
paths-ignore:
- "**/*.md"
- "**/*.gitignore"
- - "**/*.gitattributes"
+ - "**/*.gitattributes"
schedule:
- - cron: '35 15 * * 2'
+ - cron: '42 7 * * 5'
jobs:
analyze:
- name: Analyze
- runs-on: ubuntu-latest
+ name: Analyze (${{ matrix.language }})
+ # 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 (GitHub.com only)
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
+ # required for all workflows
+ security-events: write
+
+ # required to fetch internal or private CodeQL packs
+ packages: read
+
+ # only required for workflows in private repositories
actions: read
contents: read
- security-events: write
strategy:
fail-fast: false
matrix:
- language: [ 'csharp' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
+ include:
+ - language: actions
+ build-mode: none
+ - language: csharp
+ build-mode: none
+ # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
+ # Use `c-cpp` to analyze code written in C, C++ or both
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
+
+ # Add any setup steps before running the `github/codeql-action/init` action.
+ # This includes steps like installing compilers or runtimes (`actions/setup-node`
+ # or others). This is typically only required for manual builds.
+ # - name: Setup runtime (example)
+ # uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
+ build-mode: ${{ matrix.build-mode }}
# 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.
- # 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
+ # 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, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
+ # If the analyze step fails for one of the languages you are analyzing with
+ # "We were unable to automatically build your code", modify the matrix above
+ # to set the build mode to "manual" for that language. Then modify this step
+ # to build your code.
# ℹ️ 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
+ - if: matrix.build-mode == 'manual'
+ shell: bash
+ run: |
+ echo 'If you are using a "manual" build mode for one or more of the' \
+ 'languages you are analyzing, replace this with the commands to build' \
+ 'your code, for example:'
+ echo ' make bootstrap'
+ echo ' make release'
+ exit 1
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
diff --git a/GitVersion.yml b/GitVersion.yml
index 280505f..82a9b7c 100644
--- a/GitVersion.yml
+++ b/GitVersion.yml
@@ -1,4 +1,4 @@
-next-version: 2.0.0
+next-version: 2.0.1
tag-prefix: '[vV]'
mode: ContinuousDeployment
branches:
diff --git a/LICENSE.md b/LICENSE.md
index daf3b65..e3a0025 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2024 Code Shayk
+Copyright (c) 2025 Code Shayk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 55f3cc9..aa1f859 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-#
Schemio v2.0
+#
Schemio v2.0.1
[](https://github.com/CodeShayk/Schemio/blob/master/LICENSE.md)
[](https://github.com/CodeShayk/Schemio/actions/workflows/Build-Master.yml)
[](https://github.com/CodeShayk/Schemio/releases/latest)
diff --git a/src/Schemio.API/Schemio.API.csproj b/src/Schemio.API/Schemio.API.csproj
index 31f291e..3cce7a2 100644
--- a/src/Schemio.API/Schemio.API.csproj
+++ b/src/Schemio.API/Schemio.API.csproj
@@ -1,14 +1,14 @@
- net9.0
+ net462;netstandard2.0;netstandard2.1;net9.0
true
- enable
+ disable
Schemio with EntityFramework
Code Shayk
Code Shayk
.Net Library to hydrate data entities by object graph using schema paths (supports XPath & JSONPath). Supports Web API using HttpClient.
- Copyright (c) 2024 Code Shayk
+ Copyright (c) 2025 Code Shayk
https://github.com/CodeShayk/Schemio/wiki/i.-Home
ninja-icon-16.png
README.md
@@ -20,7 +20,7 @@
True
snupkg
True
- 2.0.0
+ 2.0.1
diff --git a/src/Schemio.API/WebQuery.cs b/src/Schemio.API/WebQuery.cs
index ad6b34b..eba4820 100644
--- a/src/Schemio.API/WebQuery.cs
+++ b/src/Schemio.API/WebQuery.cs
@@ -49,7 +49,7 @@ protected virtual IDictionary GetRequestHeaders()
///
///
protected virtual IEnumerable GetResponseHeaders()
- { return []; }
+ { return Enumerable.Empty(); }
///
/// Implement to construct the api web query.
@@ -149,7 +149,7 @@ async Task IWebQuery.Run(IHttpClientFactory httpClientFactory, ILo
return null;
}
- private void SetResponseHeaders(HttpResponseMessage response, TQueryResult? result)
+ private void SetResponseHeaders(HttpResponseMessage response, TQueryResult result)
{
if (response.Headers == null || result == null)
return;
@@ -173,7 +173,8 @@ private void SetResponseHeaders(HttpResponseMessage response, TQueryResult? resu
? responseHeader.Value.ElementAt(0)
: string.Empty;
- webResult.Headers ??= new Dictionary();
+ if (webResult.Headers == null)
+ webResult.Headers = new Dictionary();
webResult.Headers.Add(responseHeader.Key, value);
}
diff --git a/src/Schemio.Core/BaseQuery.cs b/src/Schemio.Core/BaseQuery.cs
index 11fb055..2429b95 100644
--- a/src/Schemio.Core/BaseQuery.cs
+++ b/src/Schemio.Core/BaseQuery.cs
@@ -1,3 +1,7 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
namespace Schemio.Core
{
///
diff --git a/src/Schemio.Core/BaseTransformer.cs b/src/Schemio.Core/BaseTransformer.cs
index 3669abf..f32a509 100644
--- a/src/Schemio.Core/BaseTransformer.cs
+++ b/src/Schemio.Core/BaseTransformer.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace Schemio.Core
{
diff --git a/src/Schemio.Core/CacheResultAttribute.cs b/src/Schemio.Core/CacheResultAttribute.cs
index d989780..ed5e808 100644
--- a/src/Schemio.Core/CacheResultAttribute.cs
+++ b/src/Schemio.Core/CacheResultAttribute.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace Schemio.Core
{
public class CacheResultAttribute : Attribute
diff --git a/src/Schemio.Core/ChildrenQueries.cs b/src/Schemio.Core/ChildrenQueries.cs
index 9906175..1e79e65 100644
--- a/src/Schemio.Core/ChildrenQueries.cs
+++ b/src/Schemio.Core/ChildrenQueries.cs
@@ -1,3 +1,6 @@
+using System;
+using System.Collections.Generic;
+
namespace Schemio.Core
{
public class ChildrenQueries
diff --git a/src/Schemio.Core/CollectionResult.cs b/src/Schemio.Core/CollectionResult.cs
index d5600b1..225a48e 100644
--- a/src/Schemio.Core/CollectionResult.cs
+++ b/src/Schemio.Core/CollectionResult.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
public class CollectionResult : List, IQueryResult
diff --git a/src/Schemio.Core/CreateSchema.cs b/src/Schemio.Core/CreateSchema.cs
index 8b0b7bc..df365d6 100644
--- a/src/Schemio.Core/CreateSchema.cs
+++ b/src/Schemio.Core/CreateSchema.cs
@@ -1,3 +1,6 @@
+using System;
+using System.Collections.Generic;
+
namespace Schemio.Core
{
#region Helpers
@@ -65,7 +68,9 @@ public IMapOrComplete Map(ISchemaPa
if (dependents != null)
foreach (var dep in ((IMappings)dependents(mapping)).GetMappings)
{
- dep.DependentOn ??= mapping.Query;
+ if (dep.DependentOn == null)
+ dep.DependentOn = mapping.Query;
+
Add(dep);
}
diff --git a/src/Schemio.Core/DataContext.cs b/src/Schemio.Core/DataContext.cs
index 2e528fe..4113e46 100644
--- a/src/Schemio.Core/DataContext.cs
+++ b/src/Schemio.Core/DataContext.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
internal class DataContext : IDataContext
diff --git a/src/Schemio.Core/EntityConfiguration.cs b/src/Schemio.Core/EntityConfiguration.cs
index 4e2c3d0..390ba19 100644
--- a/src/Schemio.Core/EntityConfiguration.cs
+++ b/src/Schemio.Core/EntityConfiguration.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
///
diff --git a/src/Schemio.Core/Helpers/ArrayUtil.cs b/src/Schemio.Core/Helpers/ArrayUtil.cs
index b9a7ae6..31dbd1a 100644
--- a/src/Schemio.Core/Helpers/ArrayUtil.cs
+++ b/src/Schemio.Core/Helpers/ArrayUtil.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace Schemio.Core.Helpers
{
public static class ArrayUtil
diff --git a/src/Schemio.Core/Helpers/Constraints.cs b/src/Schemio.Core/Helpers/Constraints.cs
index a6351a1..2d74b1b 100644
--- a/src/Schemio.Core/Helpers/Constraints.cs
+++ b/src/Schemio.Core/Helpers/Constraints.cs
@@ -1,4 +1,6 @@
-namespace Schemio.Core.Helpers
+using System;
+
+namespace Schemio.Core.Helpers
{
public static class Constraints
{
diff --git a/src/Schemio.Core/Helpers/EnumerableExtentions.cs b/src/Schemio.Core/Helpers/EnumerableExtentions.cs
index d455d10..baeed5b 100644
--- a/src/Schemio.Core/Helpers/EnumerableExtentions.cs
+++ b/src/Schemio.Core/Helpers/EnumerableExtentions.cs
@@ -1,3 +1,5 @@
+using System;
+using System.Collections.Generic;
using System.Text;
namespace Schemio.Core.Helpers
diff --git a/src/Schemio.Core/Helpers/JsonExtensions.cs b/src/Schemio.Core/Helpers/JsonExtensions.cs
index d841e5e..d69236a 100644
--- a/src/Schemio.Core/Helpers/JsonExtensions.cs
+++ b/src/Schemio.Core/Helpers/JsonExtensions.cs
@@ -1,11 +1,12 @@
-using System.Text.Json;
+using System;
+using System.Text.Json;
namespace Schemio.Core.Helpers
{
public static class JsonExtensions
{
- public static string? ToJson(this object value) => value != null ? JsonSerializer.Serialize(value) : null;
+ public static string ToJson(this object value) => value != null ? JsonSerializer.Serialize(value) : null;
- public static object? ToObject(this string value, Type type) => !string.IsNullOrEmpty(value) ? JsonSerializer.Deserialize(value, type) : null;
+ public static object ToObject(this string value, Type type) => !string.IsNullOrEmpty(value) ? JsonSerializer.Deserialize(value, type) : null;
}
}
\ No newline at end of file
diff --git a/src/Schemio.Core/Helpers/Xml/XDocumentExts.cs b/src/Schemio.Core/Helpers/Xml/XDocumentExts.cs
index 936e178..b1c47cb 100644
--- a/src/Schemio.Core/Helpers/Xml/XDocumentExts.cs
+++ b/src/Schemio.Core/Helpers/Xml/XDocumentExts.cs
@@ -1,3 +1,4 @@
+using System.Linq;
using System.Xml.Linq;
namespace Schemio.Core.Helpers.Xml
diff --git a/src/Schemio.Core/IEntityBuilder.cs b/src/Schemio.Core/IEntityBuilder.cs
index d375e1b..62cfe46 100644
--- a/src/Schemio.Core/IEntityBuilder.cs
+++ b/src/Schemio.Core/IEntityBuilder.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
public interface IEntityBuilder where TEntity : IEntity
diff --git a/src/Schemio.Core/IEntityConfiguration.cs b/src/Schemio.Core/IEntityConfiguration.cs
index a7e34c1..ec6d74c 100644
--- a/src/Schemio.Core/IEntityConfiguration.cs
+++ b/src/Schemio.Core/IEntityConfiguration.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
///
diff --git a/src/Schemio.Core/IEntityContextCache.cs b/src/Schemio.Core/IEntityContextCache.cs
index b4bbd9a..a69babb 100644
--- a/src/Schemio.Core/IEntityContextCache.cs
+++ b/src/Schemio.Core/IEntityContextCache.cs
@@ -1,4 +1,6 @@
-namespace Schemio.Core
+using System.Collections.Generic;
+
+namespace Schemio.Core
{
public interface IEntityContextCache
{
diff --git a/src/Schemio.Core/IEntityContextValidator.cs b/src/Schemio.Core/IEntityContextValidator.cs
index 62f3d29..a7d2257 100644
--- a/src/Schemio.Core/IEntityContextValidator.cs
+++ b/src/Schemio.Core/IEntityContextValidator.cs
@@ -2,6 +2,6 @@ namespace Schemio.Core
{
public interface IEntityContextValidator
{
- public void Validate(IEntityRequest context);
+ void Validate(IEntityRequest context);
}
}
\ No newline at end of file
diff --git a/src/Schemio.Core/IEntityRequest.cs b/src/Schemio.Core/IEntityRequest.cs
index f26d15f..27900a3 100644
--- a/src/Schemio.Core/IEntityRequest.cs
+++ b/src/Schemio.Core/IEntityRequest.cs
@@ -5,6 +5,6 @@ public interface IEntityRequest
///
/// Entity schema paths for data retrieval.
///
- public string[] SchemaPaths { get; set; }
+ string[] SchemaPaths { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Schemio.Core/IQuery.cs b/src/Schemio.Core/IQuery.cs
index 9fe0b58..de67feb 100644
--- a/src/Schemio.Core/IQuery.cs
+++ b/src/Schemio.Core/IQuery.cs
@@ -1,3 +1,6 @@
+using System;
+using System.Collections.Generic;
+
namespace Schemio.Core
{
///
diff --git a/src/Schemio.Core/IQueryEngine.cs b/src/Schemio.Core/IQueryEngine.cs
index acfb7cb..5b0e24b 100644
--- a/src/Schemio.Core/IQueryEngine.cs
+++ b/src/Schemio.Core/IQueryEngine.cs
@@ -1,3 +1,5 @@
+using System.Threading.Tasks;
+
namespace Schemio.Core
{
public interface IQueryEngine
diff --git a/src/Schemio.Core/IQueryExecutor.cs b/src/Schemio.Core/IQueryExecutor.cs
index 13ee57a..9e300b1 100644
--- a/src/Schemio.Core/IQueryExecutor.cs
+++ b/src/Schemio.Core/IQueryExecutor.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
public interface IQueryExecutor
diff --git a/src/Schemio.Core/IQueryList.cs b/src/Schemio.Core/IQueryList.cs
index 31c9244..9cf22e5 100644
--- a/src/Schemio.Core/IQueryList.cs
+++ b/src/Schemio.Core/IQueryList.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
public interface IQueryList
diff --git a/src/Schemio.Core/IQueryRunner.cs b/src/Schemio.Core/IQueryRunner.cs
index 13abbbb..534a646 100644
--- a/src/Schemio.Core/IQueryRunner.cs
+++ b/src/Schemio.Core/IQueryRunner.cs
@@ -1,4 +1,6 @@
-namespace Schemio.Core
+using System.Threading.Tasks;
+
+namespace Schemio.Core
{
public interface IQueryRunner
{
diff --git a/src/Schemio.Core/ITransformerQueryResult.cs b/src/Schemio.Core/ITransformerQueryResult.cs
index 893fce6..88339c4 100644
--- a/src/Schemio.Core/ITransformerQueryResult.cs
+++ b/src/Schemio.Core/ITransformerQueryResult.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace Schemio.Core
{
///
diff --git a/src/Schemio.Core/Impl/EntityBuilder.cs b/src/Schemio.Core/Impl/EntityBuilder.cs
index 48e6427..feab6b0 100644
--- a/src/Schemio.Core/Impl/EntityBuilder.cs
+++ b/src/Schemio.Core/Impl/EntityBuilder.cs
@@ -1,3 +1,7 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
namespace Schemio.Core.Impl
{
public class EntityBuilder : IEntityBuilder where T : IEntity, new()
@@ -44,11 +48,11 @@ public T Build(IDataContext context, IList queryResults)
}
return entity;
+ }
- static bool IsMatch(Type transformer, Type queryResult)
- {
- return transformer == queryResult;
- }
+ private bool IsMatch(Type transformer, Type queryResult)
+ {
+ return transformer == queryResult;
}
}
}
\ No newline at end of file
diff --git a/src/Schemio.Core/Impl/EventPublisher.cs b/src/Schemio.Core/Impl/EventPublisher.cs
index f135e55..cb284ec 100644
--- a/src/Schemio.Core/Impl/EventPublisher.cs
+++ b/src/Schemio.Core/Impl/EventPublisher.cs
@@ -1,3 +1,6 @@
+using System;
+using System.Collections.Generic;
+
namespace Schemio.Core.Impl
{
public class EventPublisher
diff --git a/src/Schemio.Core/Impl/EventSubscriber.cs b/src/Schemio.Core/Impl/EventSubscriber.cs
index 34a2668..e7f2117 100644
--- a/src/Schemio.Core/Impl/EventSubscriber.cs
+++ b/src/Schemio.Core/Impl/EventSubscriber.cs
@@ -1,3 +1,6 @@
+using System.Collections.Generic;
+using System.Linq;
+
namespace Schemio.Core.Impl
{
public class EventSubscriber : ISubscriber
diff --git a/src/Schemio.Core/Impl/QueryBuilder.cs b/src/Schemio.Core/Impl/QueryBuilder.cs
index 2ed81c2..c282ddf 100644
--- a/src/Schemio.Core/Impl/QueryBuilder.cs
+++ b/src/Schemio.Core/Impl/QueryBuilder.cs
@@ -1,3 +1,6 @@
+using System.Collections.Generic;
+using System.Linq;
+
namespace Schemio.Core.Impl
{
public class QueryBuilder : IQueryBuilder where T : IEntity
diff --git a/src/Schemio.Core/Impl/QueryExecutor.cs b/src/Schemio.Core/Impl/QueryExecutor.cs
index 4991f17..3b1e7a6 100644
--- a/src/Schemio.Core/Impl/QueryExecutor.cs
+++ b/src/Schemio.Core/Impl/QueryExecutor.cs
@@ -1,3 +1,7 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
namespace Schemio.Core.Impl
{
public class QueryExecutor : IQueryExecutor
diff --git a/src/Schemio.Core/PathMatchers/JPathMatcher.cs b/src/Schemio.Core/PathMatchers/JPathMatcher.cs
index fa2d03d..c10abea 100644
--- a/src/Schemio.Core/PathMatchers/JPathMatcher.cs
+++ b/src/Schemio.Core/PathMatchers/JPathMatcher.cs
@@ -1,3 +1,4 @@
+using System.Linq;
using Schemio.Core.Helpers;
namespace Schemio.Core.PathMatchers
diff --git a/src/Schemio.Core/PathMatchers/XPathMatcher.cs b/src/Schemio.Core/PathMatchers/XPathMatcher.cs
index 77e18d0..e962f86 100644
--- a/src/Schemio.Core/PathMatchers/XPathMatcher.cs
+++ b/src/Schemio.Core/PathMatchers/XPathMatcher.cs
@@ -1,3 +1,4 @@
+using System.Linq;
using System.Text.RegularExpressions;
namespace Schemio.Core.PathMatchers
@@ -15,7 +16,8 @@ public bool IsMatch(string inputXPath, ISchemaPaths configuredXPaths)
return true;
if (configuredXPaths.Paths.Any(x => inputXPath.Contains("ancestor::")
- && ancestorRegex.Matches(inputXPath).Select(match => match.Groups["path"].Value).Distinct().Any(match => x.EndsWith(match))))
+ && ancestorRegex.Matches(inputXPath).Cast()
+ .Select(match => match.Groups["path"].Value).Distinct().Any(match => x.EndsWith(match))))
return true;
return false;
diff --git a/src/Schemio.Core/QueryComparer.cs b/src/Schemio.Core/QueryComparer.cs
index 85a1e11..11478be 100644
--- a/src/Schemio.Core/QueryComparer.cs
+++ b/src/Schemio.Core/QueryComparer.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+
namespace Schemio.Core
{
public class QueryComparer : IEqualityComparer
diff --git a/src/Schemio.Core/QueryList.cs b/src/Schemio.Core/QueryList.cs
index bc9422b..7cd4f19 100644
--- a/src/Schemio.Core/QueryList.cs
+++ b/src/Schemio.Core/QueryList.cs
@@ -1,3 +1,6 @@
+using System.Collections.Generic;
+using System.Linq;
+
namespace Schemio.Core
{
public class QueryList : IQueryList
diff --git a/src/Schemio.Core/Schemio.Core.csproj b/src/Schemio.Core/Schemio.Core.csproj
index 3157a7e..3589c24 100644
--- a/src/Schemio.Core/Schemio.Core.csproj
+++ b/src/Schemio.Core/Schemio.Core.csproj
@@ -1,13 +1,13 @@
- net9.0
- enable
- enable
+ net462;netstandard2.0;netstandard2.1;net9.0
+ disable
+ disable
true
Code Shayk
Code Shayk
- Copyright (c) 2024 Code Shayk
+ Copyright (c) 2025 Code Shayk
https://github.com/CodeShayk/Schemio
git
README.md
@@ -21,8 +21,8 @@
True
snupkg
True
- 2.0.0
- Changes
+ 2.0.1
+ Targets .net 4.6.2, .net standard 2.0, .net standard 2.1 and .net 9.0.
- `Entity Schema` renamed to `Entity Configuration` and requires implementing `EntityContfiguration<TEntity>`.
- `IRootQuery`, `IChildQuery`, `BaseRootQuery<TParameter, TResult>` & `BaseChildQuery<TParameter,TResult>` removed.
- Both Parent and child queries need to implement `BaseQuery<TResult>` and provide override for `isContextResolved()` and `ResolveQuery()` methods.
@@ -48,6 +48,7 @@
+
diff --git a/src/Schemio.Core/ServicesExtensions.cs b/src/Schemio.Core/ServicesExtensions.cs
index 263be61..c6fa266 100644
--- a/src/Schemio.Core/ServicesExtensions.cs
+++ b/src/Schemio.Core/ServicesExtensions.cs
@@ -1,3 +1,4 @@
+using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Schemio.Core.Impl;
diff --git a/src/Schemio.EntityFramework/ISQLQuery.cs b/src/Schemio.EntityFramework/ISQLQuery.cs
index 137e8de..63c4336 100644
--- a/src/Schemio.EntityFramework/ISQLQuery.cs
+++ b/src/Schemio.EntityFramework/ISQLQuery.cs
@@ -1,3 +1,4 @@
+using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Schemio.Core;
diff --git a/src/Schemio.EntityFramework/QueryEngine.cs b/src/Schemio.EntityFramework/QueryEngine.cs
index acd2b2b..3292694 100644
--- a/src/Schemio.EntityFramework/QueryEngine.cs
+++ b/src/Schemio.EntityFramework/QueryEngine.cs
@@ -1,5 +1,7 @@
+using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Schemio.Core;
+using Microsoft.EntityFrameworkCore.Infrastructure;
namespace Schemio.EntityFramework
{
diff --git a/src/Schemio.EntityFramework/SQLQuery.cs b/src/Schemio.EntityFramework/SQLQuery.cs
index ad20b68..f23e347 100644
--- a/src/Schemio.EntityFramework/SQLQuery.cs
+++ b/src/Schemio.EntityFramework/SQLQuery.cs
@@ -1,3 +1,5 @@
+using System;
+using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Schemio.Core;
diff --git a/src/Schemio.EntityFramework/Schemio.EntityFramework.csproj b/src/Schemio.EntityFramework/Schemio.EntityFramework.csproj
index b9dcc86..e43ec38 100644
--- a/src/Schemio.EntityFramework/Schemio.EntityFramework.csproj
+++ b/src/Schemio.EntityFramework/Schemio.EntityFramework.csproj
@@ -1,15 +1,15 @@
- net9.0
- enable
+ net9.0
+ disable
true
- enable
+ disable
Schemio with EntityFramework
Code Shayk
Code Shayk
.Net Library to hydrate data entities by object graph using schema paths (supports XPath & JSONPath). Supports Entity Framework for querying database.
- Copyright (c) 2024 Code Shayk
+ Copyright (c) 2025 Code Shayk
https://github.com/CodeShayk/Schemio/wiki/i.-Home
ninja-icon-16.png
README.md
@@ -21,7 +21,7 @@
True
snupkg
True
- 2.0.0
+ 2.0.1
@@ -44,7 +44,7 @@
-
+
@@ -52,3 +52,4 @@
+
diff --git a/src/Schemio.SQL/ISQLQuery.cs b/src/Schemio.SQL/ISQLQuery.cs
index 7292752..bc23206 100644
--- a/src/Schemio.SQL/ISQLQuery.cs
+++ b/src/Schemio.SQL/ISQLQuery.cs
@@ -1,4 +1,5 @@
using System.Data;
+using System.Threading.Tasks;
using Schemio.Core;
namespace Schemio.SQL
diff --git a/src/Schemio.SQL/QueryEngine.cs b/src/Schemio.SQL/QueryEngine.cs
index ad5d168..31becff 100644
--- a/src/Schemio.SQL/QueryEngine.cs
+++ b/src/Schemio.SQL/QueryEngine.cs
@@ -1,4 +1,6 @@
+using System;
using System.Data.Common;
+using System.Threading.Tasks;
using Schemio.Core;
namespace Schemio.SQL
diff --git a/src/Schemio.SQL/SQLQuery.cs b/src/Schemio.SQL/SQLQuery.cs
index 85fa883..1fc1865 100644
--- a/src/Schemio.SQL/SQLQuery.cs
+++ b/src/Schemio.SQL/SQLQuery.cs
@@ -1,4 +1,6 @@
+using System;
using System.Data;
+using System.Threading.Tasks;
using Schemio.Core;
namespace Schemio.SQL
diff --git a/src/Schemio.SQL/Schemio.SQL.csproj b/src/Schemio.SQL/Schemio.SQL.csproj
index 1946be3..8331a24 100644
--- a/src/Schemio.SQL/Schemio.SQL.csproj
+++ b/src/Schemio.SQL/Schemio.SQL.csproj
@@ -1,9 +1,9 @@
- net9.0
- enable
- enable
+ net462;netstandard2.1;net9.0
+ disable
+ disable
true
Schemio with SQL
Code Shayk
@@ -14,14 +14,14 @@
README.md
ninja-icon-16.png
https://github.com/CodeShayk/Schemio/wiki/i.-Home
- Copyright (c) 2024 Code Shayk
+ Copyright (c) 2025 Code Shayk
.Net Library to hydrate data entities by object graph using schema paths (supports XPath & JSONPath). Supports Dapper for querying SQL database.
LICENSE.md
True
True
snupkg
True
- 2.0.0
+ 2.0.1