Please guide me to use ado.net in asp.net core 1.0
You should include SqlClient to your project.json.
"frameworks": {
"netstandard1.3": {
"dependencies": {
"System.Data.SqlClient": "4.1.0-*"
}
}
}
Then you will be able to use old fashion sql connection:
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
using (SqlCommand command = new SqlCommand("SELECT * FROM dbo.Test", con))
{
var reader = command.ExecuteReader();
// map your reader
}
}
Another scenario:
Imports Oracle.DataAccess
Imports Oracle.DataAccess.Client
Closing because there doesn't appear to be any further action required on this issue.
Most helpful comment
You should include SqlClient to your project.json.
Then you will be able to use old fashion sql connection: