I have an ASP.NET Core 7 app with EF Core 7. I need to query some tables from a database which is not in my control, and I don't even have the dbcontext
, but I have the connection string to the database.
I need to query some table from that database using EF Core 7 to some DTO which are not entity types. I have tried with Dapper and it works, but how to achieve the same thing with EF Core?
1条答案
按热度按时间qyswt5oh1#
You can use my SqlQuery nuget library; https://www.nuget.org/packages/ErikEJ.EntityFrameworkCore.SqlServer.SqlQuery/7.0.0-preview1