EfueliteSolutionsDBReader 1.0.1
dotnet add package EfueliteSolutionsDBReader --version 1.0.1
NuGet\Install-Package EfueliteSolutionsDBReader -Version 1.0.1
<PackageReference Include="EfueliteSolutionsDBReader" Version="1.0.1" />
paket add EfueliteSolutionsDBReader --version 1.0.1
#r "nuget: EfueliteSolutionsDBReader, 1.0.1"
// Install EfueliteSolutionsDBReader as a Cake Addin #addin nuget:?package=EfueliteSolutionsDBReader&version=1.0.1 // Install EfueliteSolutionsDBReader as a Cake Tool #tool nuget:?package=EfueliteSolutionsDBReader&version=1.0.1
Efuelite Solutions Database Reader
This is a simple to implement, lightweight and highly efficient package used to handle data conversion and null values when reading data from databases such as Microsoft Sql, MySql and Oracle in .Net applications to Database
Usage
In class where Efuelite Solutions Database Reader is to be used, just import the name space EfueliteSolutionsDBReader.
using EfueliteSolutionsDBReader;
There are methods to read data from Microsoft Sql, My Sql and Oracle databases for different data types and convert them to different variable type in C# while handling null values.
Conversion to String variable
- To handle data conversion from database value to String variable type in C#, simply use as,
string MyStringVariable = DB.DBString(DbReaderVariable, "DatabaseStringColumnName");
- You can supply a default value such as,
string MyStringVariable = DB.DBString(DbReaderVariable, "DatabaseStringColumnName", YourDefaultValue);
- When the database column is null, your default value is returned.
- If no default value is given, then a safe empty string is returned.
Conversion to Integer variable
- To handle data conversion from database value to Integer variable type in C#, simply use as,
int MyIntegerVariable = DB.DBInteger(DbReaderVariable, "DatabaseIntegerColumnName");
- You can supply a default value such as,
int MyIntegerVariable = DB.DBInteger(DbReaderVariable, "DatabaseIntegerColumnName", YourDefaultValue);
- When the database column is null, your default value is returned.
- If no default value is given, then an Integer of zero is returned.
Conversion to DateTime variable
- To handle data conversion from database value to DateTime variable type in C#, simply use as,
DateTime MyDateTimeVariable = DB.DBDateTime(DbReaderVariable, "DatabaseDateTimeColumnName");
- You can supply a default value such as,
DateTime MyDateTimeVariable = DB.DBDateTime(DbReaderVariable, "DatabaseDateTimeColumnName", YourDefaultValue);
- When the database column is null, your default value is returned.
- If no default value is given, then a DateTime of value 1900-01-01 is returned.
Conversion to Boolean variable
- To handle data conversion from database value to Boolean variable type in C#, simply use as,
bool MyBooleanVariable = DB.DBBoolean(DbReaderVariable, "DatabaseBooleanColumnName");
- You can supply a default value such as,
bool MyBooleanVariable = DB.DBBoolean(DbReaderVariable, "DatabaseBooleanColumnName", YourDefaultValue);
- When the database column is null, your default value is returned.
- If no default value is given, then a Boolean of value false is returned.
Conversion to Decimal variable
- To handle data conversion from database value to Decimal variable type in C#, simply use as,
decimal MyDecimalVariable = DB.DBDecimal(DbReaderVariable, "DatabaseDecimalColumnName");
- You can supply a default value such as,
decimal MyDecimalVariable = DB.DBDecimal(DbReaderVariable, "DatabaseDecimalColumnName", YourDefaultValue);
- When the database column is null, your default value is returned.
- If no default value is given, then a Decimal of value 0.00 is returned.
Conversion to Double variable
- To handle data conversion from database value to Double variable type in C#, simply use as,
double MyDoubleVariable = DB.DBDouble(DbReaderVariable, "DatabaseDoubleColumnName");
- You can supply a default value such as,
double MyDoubleVariable = DB.DBDouble(DbReaderVariable, "DatabaseDoubleColumnName", YourDefaultValue);
- When the database column is null, your default value is returned.
- If no default value is given, then a Double of value 0.00 is returned.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- MySql.Data (>= 8.3.0)
- System.Data.OleDb (>= 8.0.0)
- System.Data.OracleClient (>= 1.0.8)
- System.Data.SqlClient (>= 4.8.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EfueliteSolutionsDBReader:
Package | Downloads |
---|---|
EfueliteSolutionsDbLogger
Its very fast and simple to use. |
GitHub repositories
This package is not used by any popular GitHub repositories.
A simple lightweight Database reader that does the data conversions
and handles null value check when reading from Microsoft Sql, MySql and Oracle Databases in C#
applications.