File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System . Data . SqlClient ;
2
+
3
+ namespace KY . Core . Sql . Extensions
4
+ {
5
+ public static class SqlDataReaderExtension
6
+ {
7
+ public static int GetInt32 ( this SqlDataReader reader , int ordinal , int nullValue )
8
+ {
9
+ return reader . IsDBNull ( ordinal ) ? nullValue : reader . GetInt32 ( ordinal ) ;
10
+ }
11
+
12
+ public static string GetString ( this SqlDataReader reader , int ordinal , string nullValue )
13
+ {
14
+ return reader . IsDBNull ( ordinal ) ? nullValue : reader . GetString ( ordinal ) ;
15
+ }
16
+
17
+ public static byte GetByte ( this SqlDataReader reader , int ordinal , byte nullValue )
18
+ {
19
+ return reader . IsDBNull ( ordinal ) ? nullValue : reader . GetByte ( ordinal ) ;
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+
3
+ <PropertyGroup >
4
+ <TargetFramework >netstandard2.0</TargetFramework >
5
+ <Authors >KY-Programming</Authors >
6
+ <Company >KY-Programming</Company >
7
+ <Product >KY.Core</Product >
8
+ <Version >5.0.0</Version >
9
+ <Description >KY.Core.Sql for .net Standard</Description >
10
+ <Copyright >2019 - KY-Programming</Copyright >
11
+ <PackageLicenseExpression >GPL-3.0-or-later</PackageLicenseExpression >
12
+ <PackageProjectUrl >https://github.com/KY-Programming/core</PackageProjectUrl >
13
+ <PackageIconUrl >https://ky-programming.de/images/logos/128.png</PackageIconUrl >
14
+ <RepositoryUrl >https://github.com/KY-Programming/core</RepositoryUrl >
15
+ <PackageTags >KY Core SQL</PackageTags >
16
+ </PropertyGroup >
17
+
18
+ <ItemGroup >
19
+ <PackageReference Include =" KY.Core.Common" Version =" 4.4.0" />
20
+ <PackageReference Include =" System.Data.SqlClient" Version =" 4.6.0" />
21
+ </ItemGroup >
22
+
23
+ </Project >
You can’t perform that action at this time.
0 commit comments