-
Notifications
You must be signed in to change notification settings - Fork 2
RowCount
Darren Comeau edited this page Oct 9, 2018
·
1 revision
Retrieve the number of rows in the object.
public int RowCount(string schemaName, string objectName);Parameters
schemaName String
The database schema which hosts the object.
objectName String
The name of the database table or view which we should retrieve the row count for.
Retrieve the row count for a table.
// Setup the Database Tester object using the MS SQL implementation
var connectionstring = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=tempdb;Integrated Security=SSPI;";
VulcanAnalytics.DBTester.DatabaseTester tester = new VulcanAnalytics.DBTester.MsSqlDatabaseTester(connectionstring);
// Parameters for RowCount method
var schemaName = "dbo";
var tableName = "TestPerson";
// Call the RowCount method to insert the rows
tester.RowCount(schemaName, tableName);Intended for use with tables and views.