Entity framework code convert to sql

first100 81 Reputation points
2021-04-27T10:17:42+00:00

Hi,

I have to convert my ef code to sql, but i have some problems to accomplish this task,
What can be the best ways to retrieve a query from entity framework ?

Thanks

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
749 questions
{count} votes

3 answers

Sort by: Most helpful
  1. cristopheB 551 Reputation points
    2021-04-27T10:52:36.803+00:00

    Hello,
    with sql server profile you can intercept the query who is send to the database

    https://learn.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler?view=sql-server-ver15

    hope this help

    0 comments No comments

  2. cristopheB 551 Reputation points
    2021-04-27T11:10:56.86+00:00
    0 comments No comments

  3. Daniel Zhang-MSFT 9,626 Reputation points
    2021-04-28T02:54:24.297+00:00

    Hi 01107111,
    For this question, Oleksii Aza has provided some suggestions in this thread and hope helpful to you.
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.