Created
July 24, 2018 00:34
-
-
Save vmussak/569ba1e59d9abf113cb82d7e88ff30b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (reader.HasRows) | |
{ | |
var time = new Stopwatch(); | |
time.Start(); | |
while (reader.Read()) | |
lstCliente.Add(new Cliente | |
{ | |
Id = (int)reader["Id"], | |
Nome = reader["Nome"].ToString(), | |
DataNascimento = (DateTime)reader["DataNascimento"], | |
ClienteEspecial = (bool)reader["ClienteEspecial"], | |
NomeDaMae = reader["NomeDaMae"].ToString(), | |
QuantidadeFilhos = (byte)reader["QuantidadeFilhos"] | |
}); | |
time.Stop(); | |
Console.WriteLine("Tempo buscando pelo nome da coluna: {0}", time.Elapsed); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment