예제 #1
0
 protected IList <T> RetornaListaDados <T>(string Procedure, List <SqlParameter> Par)
 {
     try
     {
         ExecCommands con = new ExecCommands();
         return(con.RetornaLista <T>(Procedure, Par, conectionString));
     }
     catch (Exception ex)
     {
         Common.TratarLogErro(ex);
         return(null);
     }
 }
예제 #2
0
 protected IList <T> RetornaListaDados <T>(TipoSql sql, object obj = null)
 {
     try
     {
         if (obj != null)
         {
             AdicionaParametro(obj, sql.ToString());
         }
         else
         {
             AdicionaParametro(null, sql.ToString());
         }
         ExecCommands con = new ExecCommands();
         return(con.RetornaLista <T>(procedure, parametros, conectionString));
     }
     catch (Exception ex)
     {
         Common.TratarLogErro(ex);
         return(null);
     }
 }