How to use ADO.NET asynchronous methods in .NET Core without Entity Framework

asp.net-core asp.net-core-webapi entity-framework-core

Question

I believe Entity Framework Core is slow for the application that I am working on. It is a .NET Core Web API. I need to convert it to use ADO.NET and at the same time take advantage of asynchronous programming that is easy in Entity Framework Core. Any resources or direction will help me kick start my migration.

1
0
5/8/2018 9:03:38 PM

Popular Answer

I haven't tested it, but something like this would allow you to use ADO.NET objects:

var con = ctx.Database.GetDbConnection();
var cmd = con.CreateCommand();
cmd.CommandText = "...";
var rdr = await cmd.ExecuteReaderAsync();
1
5/8/2018 9:53:40 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow