generated from dailydevops/dotnet-template
-
-
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.
- Loading branch information
Showing
21 changed files
with
2,872 additions
and
21 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 |
---|---|---|
|
@@ -24,7 +24,6 @@ jobs: | |
name: Build & Tests | ||
uses: dailydevops/pipelines/.github/workflows/[email protected] | ||
with: | ||
disablePublish: true | ||
dotnet-logging: ${{ inputs.dotnet-logging }} | ||
dotnet-version: ${{ vars.NE_DOTNET_TARGETFRAMEWORKS }} | ||
solution: ./Extensions.Data.sln | ||
|
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,2 +1,17 @@ | ||
# template-dotnet | ||
.NET template for repositories | ||
# NetEvolve.Extensions.Data | ||
|
||
This package contains multiple extensions for native Components from the .NET Framework, especially for the `System.Data` namespace. | ||
|
||
The main goal of this package is to provide a set of time-saving methods, to simplify the development in context of data handling. | ||
|
||
## Installation | ||
|
||
To install this package, you can use the NuGet Package Manager in Visual Studio or the `dotnet` CLI. | ||
|
||
```bash | ||
dotnet add package NetEvolve.Extensions.Data | ||
``` | ||
|
||
## Usage | ||
|
||
All extensions are available in the `NetEvolve.Extensions.Data` namespace. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace NetEvolve.Extensions.Data; | ||
|
||
using System.Data; | ||
using NetEvolve.Arguments; | ||
|
||
/// <summary> | ||
/// Provides a set of extension methods for <see cref="IDataReader"/>. | ||
/// </summary> | ||
public static class IDataReaderExtensions | ||
{ | ||
/// <summary> | ||
/// Determines whether the <see cref="IDataReader"/> contains a column with the specified name. | ||
/// </summary> | ||
/// <param name="reader">The <see cref="IDataReader"/> to check.</param> | ||
/// <param name="name">The name of the column to find.</param> | ||
/// <returns><see langword="true"/> if the <see cref="IDataReader"/> contains a column with the specified name; otherwise, <see langword="false"/>.</returns> | ||
public static bool HasColumn(this IDataReader reader, string name) | ||
{ | ||
Argument.ThrowIfNull(reader); | ||
Argument.ThrowIfNullOrWhiteSpace(name); | ||
|
||
return Enumerable | ||
.Range(0, reader.FieldCount) | ||
.Any(i => reader.GetName(i).Equals(name, StringComparison.OrdinalIgnoreCase)); | ||
} | ||
} |
Oops, something went wrong.