public void ExecuteDataTableAsList_ByProcedure() { using (var cmd = NorthwindAdoRepository.GetProcedureCommand("OrderAndOrderDetails")) { var tables = NorthwindAdoRepository.ExecuteDataTableAsList(cmd).ToList(); Assert.AreEqual(2, tables.Count); tables.All(table => table.HasErrors == false).Should().Be.True(); } }
public void ExecuteDataTableAsList_BySqlString() { var sql = string.Concat(GetOrdersSql, ";", GetOrderDetailsSql); using (var cmd = NorthwindAdoRepository.GetSqlStringCommand(sql)) { var tables = NorthwindAdoRepository.ExecuteDataTableAsList(cmd); tables.Count.Should().Be(2); tables.All(table => table.HasErrors == false).Should().Be.True(); } }