Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.net Web API With No Entity Framework

Tags:

asp.net

We want to start using Asp.net web api for our future enterprise services however we do not want to use EF for data access.

Are there any samples out there for Asp.net Web APi working with regular ado.net classes instead of EF?

Thanks.

like image 385
dot net learner Avatar asked Oct 23 '22 13:10

dot net learner


1 Answers

Are you looking for code samples for how to use e.g., SqlConnection, SqlCommand, SqlDataReader?

You would use the classes in System.Data.SqlClient if you are trying to talk to SQL Server, System.Data.OracleClient if you're trying to talk to Oracle, or System.Data.Odbc if you're trying to talk to MySQL.

Here are some code samples for how to call a stored procedure from ADO.NET. Good luck!

like image 66
criticalfix Avatar answered Nov 15 '22 10:11

criticalfix