How to get a SQL Query to a DTO? RRS feed

  • Question

  • User-1234822642 posted

    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. 

    Tuesday, June 23, 2020 6:28 AM

All replies