The call to .Any()
returns a boolean value indicating whether or not any records were found.
If you want to return the actual records, try this:
- Change
return data.Any();
toreturn data;
- Change the return type on your method from
database_ab
toIEnumerable<database_ab>
.