0

I am facing a problem while fetching SQL Server data using ASP.NET Core with Dapper method.

I have a views with 3 varbinary(max) columns with 800 records, which executes under 2 seconds in SSMS.

But in .NET Core, it is taking around 1 minute to return the result.

Please see Dapper data access methods I tried below.

Method 1:

var data = await connection.QueryMultipleAsync(command);

Method 2:

var data = await connection.QueryAsync<ModelName>(command);

Can anyone help me to solve the issue?

Which is the fastest Dapper method to fetch varbinary(max) data with same time as in SSMS?

1 Answer 1

1

The short answer is that they should not have any difference in performance, and since they have, there must be something else happening, but it is not possible to tell what as you haven't provided a repro of the problem.

If you are new to Dapper, my recommendation is to take a look a this tutorial I wrote. You'll get your answers: https://medium.com/dapper-net/multiple-executions-56c410e9f8dd

The full tutorial is here: https://medium.com/dapper-net/dapper-net-tutorial-summary-79125c8ecdb2

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.