how to get count based on rows in entity framework core code example
Example: entity framework return count of records
var count = (from o in context.MyContainer
where o.ID == '1'
from t in o.MyTable
select t).Count();