Exemple #1
0
 private int GenericoDapper(string sqlString, object objectParams, out string mensagem)
 {
     try
     {
         using (_Contexto = _Conexao.GetOpenConnection())
         {
             _Contexto.Execute(sqlString, objectParams, commandType: CommandType.Text);
             mensagem = null;
             return(0);
         }
     }
     catch (Exception ex)
     {
         mensagem = ex.Message;
         return(1);
     }
     finally
     {
         _Conexao.Desconection();
     }
 }