AdoNetCore.AseClient
0.9.1
See the version list below for details.
dotnet add package AdoNetCore.AseClient --version 0.9.1
NuGet\Install-Package AdoNetCore.AseClient -Version 0.9.1
<PackageReference Include="AdoNetCore.AseClient" Version="0.9.1" />
paket add AdoNetCore.AseClient --version 0.9.1
#r "nuget: AdoNetCore.AseClient, 0.9.1"
// Install AdoNetCore.AseClient as a Cake Addin #addin nuget:?package=AdoNetCore.AseClient&version=0.9.1 // Install AdoNetCore.AseClient as a Cake Tool #tool nuget:?package=AdoNetCore.AseClient&version=0.9.1
Open a database connection
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using(var connection = new AseConnection(connectionString))
{
connection.Open();
// use the connection...
}
Execute a SQL statement and read response data
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "SELECT FirstName, LastName FROM Customer";
using (var reader = command.ExecuteReader())
{
// Get the results.
while (reader.Read())
{
var firstName = reader.GetString(0);
var lastName = reader.GetString(1);
// Do something with the data...
}
}
}
}
Execute a SQL statement that returns no results
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "INSERT INTO Customer (FirstName, LastName) VALUES ('Fred', 'Flintstone')";
var recordsModified = command.ExecuteNonQuery();
}
}
Execute a SQL statement that returns a scalar value
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "SELECT COUNT(*) FROM Customer";
var result = command.ExecuteScalar();
}
}
Use input parameters with a SQL query
Note: ASE only allows Output
, InputOutput
, and ReturnValue
parameters with stored procedures
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString)
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "SELECT TOP 1 FirstName FROM Customer WHERE LastName = @lastName";
command.Parameters.AddWithValue("@lastName", "Rubble");
var result = command.ExecuteScalar();
}
}
Execute a stored procedure and read response data
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString)
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "GetCustomer";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@lastName", "Rubble");
using (var reader = command.ExecuteReader())
{
// Get the results.
while (reader.Read())
{
var firstName = reader.GetString(0);
var lastName = reader.GetString(1);
// Do something with the data...
}
}
}
}
Execute a stored procedure that returns no results
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "CreateCustomer";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@firstName", "Fred");
command.Parameters.AddWithValue("@lastName", "Flintstone");
command.ExecuteNonQuery();
}
}
Execute a stored procedure that returns a scalar value
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "CountCustomer";
command.CommandType = CommandType.StoredProcedure;
var result = command.ExecuteScalar();
}
}
Use input, output, and return parameters with a stored procedure
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = "GetCustomerFirstName";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@lastName", "Rubble");
var outputParameter = command.Parameters.Add("@firstName", AseDbType.VarChar);
outputParameter.Direction = ParameterDirection.Output;
var returnParameter = command.Parameters.Add("@returnValue", AseDbType.Integer);
returnParameter.Direction = ParameterDirection.ReturnValue;
command.ExecuteNonQuery();
//Do something with outputParameter.Value and returnParameter.Value...
}
}
Execute a stored procedure and read response data with Dapper
var connectionString = "Data Source=myASEserver;Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;";
using (var connection = new AseConnection(connectionString))
{
connection.Open();
var barneyRubble = connection.Query<Customer>("GetCustomer", new {lastName = "Rubble"}, commandType: CommandType.StoredProcedure).First();
// Do something with the result...
}
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 | netcoreapp1.0 is compatible. netcoreapp1.1 is compatible. netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 1.0
- Microsoft.NETCore.App (>= 1.0.5)
- System.Data.Common (>= 4.3.0)
-
.NETCoreApp 1.1
- Microsoft.NETCore.App (>= 1.1.2)
- System.Data.Common (>= 4.3.0)
-
.NETCoreApp 2.0
- System.Data.Common (>= 4.3.0)
- System.Security.Permissions (>= 4.4.1)
-
.NETFramework 4.6
- No dependencies.
NuGet packages (14)
Showing the top 5 NuGet packages that depend on AdoNetCore.AseClient:
Package | Downloads |
---|---|
linq2db.Sybase.DataAction
LINQ to Sybase ASE is a data access technology that provides a run-time infrastructure for managing relational data as objects. Install this package only if you want to use database model scaffolding using T4 templates (requires Visual Studio or Rider), otherwise you should use linq2db package. |
|
linq2db.LINQPad
Supported databases: IBM DB2 LUW/zOS, Firebird, IBM Informix, Microsoft Access, Microsoft Sql Server (+Azure), Microsoft Sql Server Compact, MySql, MariaDB, Oracle, PostgreSQL, SQLite, SAP HANA, SAP/Sybase ASE, ClickHouse. |
|
ADONetHelper.ASE
Extends ADONetHelper library to ASE |
|
EntityFrameworkCore.Ase
A very barebones implementation of EntityFrameworkCore. Supports basic CRUD interactions. Lots of untested features. |
|
MYear.ODA
MYear.ODA is a high-performance ORM component for SqlServer / MySql /Oracle / DB2 /SQLite ; It support .Net Framework / .NetCore /.NetStandard |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on AdoNetCore.AseClient:
Repository | Stars |
---|---|
linq2db/linq2db
Linq to database provider.
|
Version | Downloads | Last updated |
---|---|---|
0.19.2 | 553,728 | 2/10/2021 |
0.19.1 | 96,768 | 9/3/2020 |
0.19.0 | 1,101 | 9/2/2020 |
0.18.0 | 111,984 | 3/16/2020 |
0.17.0 | 5,193 | 2/27/2020 |
0.16.0 | 30,233 | 10/27/2019 |
0.15.0 | 1,925 | 10/20/2019 |
0.14.0 | 60,018 | 6/12/2019 |
0.13.1 | 31,278 | 11/18/2018 |
0.13.0 | 2,034 | 11/7/2018 |
0.11.0 | 32,340 | 8/27/2018 |
0.10.1 | 6,706 | 5/14/2018 |
0.10.0 | 4,099 | 4/16/2018 |
0.9.2 | 1,504 | 3/22/2018 |
0.9.1 | 1,506 | 1/17/2018 |
0.9.0 | 1,955 | 1/16/2018 |
Beta release -- all major types supported