A community member has associated this post with a similar question:
How the rewrite this IN condition logic to handle in best performance for dotnet core webapi?

Only moderators can edit this content.

How the below logic handle in best way for dotnet core webapi?

Elaya Raja 96 Reputation points
2022-06-06T18:42:50.863+00:00

How the below logic handle in best way for dotnet core webapi?

//Query is like ***** where JoinDateTime>@startDate AND JoinDateTime<@endDate AND EmpId IN (@EmpId )

var result = await _database.QueryAsync<Employee>(query,
new
{
startDate,
endDate,
EmpId = listOfEmployeeID.ToArray() // Empid is integer and always passing more than 1000+
});

Thanks
Jo

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,367 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,156 questions
0 comments No comments
{count} votes