public override int Run(string[] remainingArguments)
        {
            var results = SchemaReader.GetTables(connectionString.ToString());

            foreach (var table in results)
            {
                var className = (table.Schema + "." + table.Name).Replace(".", "_");

                var file = Path.Combine(Directory, className + ".cs");

                using (var stream = new FileStream(file, FileMode.Create))
                    using (var writer = new StreamWriter(stream, Encoding.UTF8))
                    {
                        writer.WriteLine("using System;");
                        writer.WriteLine();
                        writer.WriteLine("namespace " + Namespace);
                        writer.WriteLine("{");
                        writer.WriteLine("    public partial class " + className);
                        writer.WriteLine("    {");

                        foreach (var column in table.Columns)
                        {
                            SqlTypeInfo type;

                            if (!typeMapping.TryGetValue(column.Type, out type))
                            {
                                throw new Exception("Unable to convert SQL type to .NET type: " + column.Type);
                            }

                            if (column.PrimaryKeyPosition.HasValue)
                            {
                                writer.WriteLine("         [PrimaryKeyPosition({0})]", column.PrimaryKeyPosition.Value);
                            }

                            writer.WriteLine("         public {0} {1};", type.GetTypeExpression(column.IsNullable), column.Name);
                        }

                        writer.WriteLine("    }");
                        writer.WriteLine("}");
                    }
            }

            return(0);
        }