Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to get a SQL Query to a DTO?

$
0
0

Hello there,

I am currently migrating my asp.net project to asp.net core as per my clients requirement and I am stuck with a specific part for which i will need your help of. 

I am using the following piece of code to retrieve the SQL to the DTO on the BLL. 

result.data = _dbContext.Database.SqlQuery<sysmstatusgroup_dto>(sqlFinal).ToList(); but then i get an error which says that i cannot use SqlQuery anymore on the new entity framework. 

Is there a work around that i go with to achieve the same task? 

Also to break down it further what i am doing is a data definition and not a data manipulation. 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>