Martin

Martin

  • NA
  • 16
  • 1.1k

How to count Id

Feb 27 2023 9:53 PM

I have a table where i want number of ID with entity framework core. I 'm using CountAsync but it it returning number 26.

But there ID 27. Picture result from querry in Azure Studio. Am I'm doing something wrong?

Example of method:

public async Task<int> GetNumberOfId()
{
    int number = await DB.mytable.CountAsync(); ; 
    return number;
}


Answers (3)