title: Convert Npgsql text type to C# type
body: <p>I need to find way to convert Npgsql type (given as text) to C# Type object.
  Example of code:</p>
  
  <pre><code>public Type ConvertFromNpgsqlType(string a_sNpglsqType)
  {
     //TODO
     if (string.Equals(a_sNpglsqType, "integer")
     {
       return typeof(int);
     }
     //...
     return typeof(object);
  }
  </code></pre>
  
  <p>And i have "a_sNpgsqlType" argument value from pgsql query where i had values as:</p>
  
  <pre><code>   i integer, OUT pass text,(...)
  </code></pre>
  
  <p>All things was realy easy...
  But i don't know how can i convert Npgsql string type to C# Type object
  easiest way to do it is create a very long "if else", but in my opinion it's the worst way to solved it :(</p>
  
  <p>Maybe someone knows how I can do it? :)</p>