BlueGroup.ClsDBSupport.Oracle
1.0.3
See the version list below for details.
dotnet add package BlueGroup.ClsDBSupport.Oracle --version 1.0.3
NuGet\Install-Package BlueGroup.ClsDBSupport.Oracle -Version 1.0.3
<PackageReference Include="BlueGroup.ClsDBSupport.Oracle" Version="1.0.3" />
paket add BlueGroup.ClsDBSupport.Oracle --version 1.0.3
#r "nuget: BlueGroup.ClsDBSupport.Oracle, 1.0.3"
// Install BlueGroup.ClsDBSupport.Oracle as a Cake Addin #addin nuget:?package=BlueGroup.ClsDBSupport.Oracle&version=1.0.3 // Install BlueGroup.ClsDBSupport.Oracle as a Cake Tool #tool nuget:?package=BlueGroup.ClsDBSupport.Oracle&version=1.0.3
BlueGroup.ClsDBSupport.Oracle
BlueGroup.ClsDBSupport.Oracle is an open-source library used to access and operate on Oracle DataBases. It is a wrapper for the BlueGroup.ClsDBSupport.Base package, specific for Oracle DataBases.
How To Use
Just add the package to your project via NuGet Package Manager.
The DataBase Connection String must be provided as a parameter of the constructor.
If you use an Alias for the DataSource, you must pass the tnsnames.ora
path as a parameter of the specific constructor, otherwise the client won't be able to resolve the alias.
Methods
Query
This method is used to retrieve multiple records from any DB Table. Only SELECT
statements should be used as queries. Results of the query are returned as a DataSet inside a specific structure.
Query<T>
This method is used to retrieve multiple records from any DB Table. Only SELECT
statements should be used as queries. Results of the query are returned as a List<T> inside a specific structure. Note that, in this case, the DataBase columns must have the same name of the object's properties, or the object's properties must be marked with the attribute DbColumn("COLUMN_NAME")
or DbNullableColumn("COLUMN_NAME")
for nullable columns.
ExecCommand
This method is used to perform all the operations on DB objects and records (INSERT
, DELETE
, UPDATE
, ALTER TABLE
, etc...).
ScalarQuery
This method is used to retrieve a single value from a DB Table (the value of a single column of a Table for a specific record); the value is returned as a string
inside a specific structure.
ScalarQuery<T>
This method is used to retrieve a single record from a DB Table; the value is returned as an object of type T inside a specific structure. Note that, in this case, the DataBase columns must have the same name of the object's properties, or the object's properties must be marked with the attribute DbColumn("COLUMN_NAME")
or DbNullableColumn("COLUMN_NAME")
for nullable columns.
ExecCommandList
This method is used to perform several commands in a single transaction. If all commands have successful response, the transaction is committed, while if one (or more) fail, the transaction is rolled back. Commands must be passed to the method as a List<string>
and they must be enlisted in the desired order of execution.
Return Values
All methods return a specific return structure, which inherits from a generic ReturnStruct class. The properties of the generic ReturnStruct class (which are inherited by ALL specific return structures) are:
- RetVal: it can assume either
SUCCESS
orERROR
values, according to the result of the query/command; - Message: if the result is
ERROR
, it contains the error message; - LastCommand: contains the last executed command. If you are trying to execute a list of commands and something goes wrong, it contains the command that resulted in the error.
The specific return structures are the following (with the additional specific properties):
ReturnStructQuery
For the Query method.
- RetDS: a
DataSet
containing the results of the query; - RowsFetched: the number of rows fetched by the query. It is equal to
RetDS.Tables[0].Rows.Count
.
This class also has a CheckExistsResult() method, that returns true if the RetDS object is not null, contains at least one table with at least one row, false otherwise.
ReturnStructQuery<T>
For the Query<T> method.
- RetList: a
List<T>
containing the results of the query; - RowsFetched: the number of rows fetched by the query. It is equal to
RetList.Count
.
This class also has a CheckExistsResult() method, that returns true if the RetList object is not null and contains at least one element, false otherwise.
ReturnStructExecCommand
For the ExecCommand method.
- RowsAffected: the number of rows affected by the executed command.
ReturnStructScalarQuery
For the ScalarQuery method.
- ResultValue: a
string
containing the single result of the query.
ReturnStructScalarQuery<T>
For the ScalarQuery<T> method.
- ResultValue: a
T
object which is the result of the query.
ReturnStructExecCommandList
For the ExecCommandList method.
- RowsAffected: a
List<int>
containing the number of rows affected by each executed command in the corresponding list.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- BlueGroup.ClsDBSupport.Base (>= 1.0.3)
- Oracle.ManagedDataAccess (= 19.18.0)
-
.NETFramework 4.5
- BlueGroup.ClsDBSupport.Base (>= 1.0.3)
- Oracle.ManagedDataAccess (= 19.18.0)
-
.NETFramework 4.6.2
- BlueGroup.ClsDBSupport.Base (>= 1.0.3)
- Oracle.ManagedDataAccess (= 19.18.0)
-
.NETStandard 2.1
- BlueGroup.ClsDBSupport.Base (>= 1.0.3)
- Oracle.ManagedDataAccess.Core (= 3.21.90)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.