1) If column name equals [$], then Generator failed with exception IndexOutOfRange.
2) And if default of column equals (null) or some decimal value (0.5 for example), then in class constuctor we can see something like (see KoeffVed)
public DogParam()
{
SumMat = 0m;
SumVed = 0m;
SumPnr = 0m;
KoeffVed = m;
}
3) And my suggestion is change class SchemaReader (Add Regex to method ReadSchema)
private abstract class SchemaReader
{
protected readonly DbCommand Cmd;
protected SchemaReader(DbConnection connection, DbProviderFactory factory)
{
Cmd = factory.CreateCommand();
if(Cmd != null)
Cmd.Connection = connection;
}
public GeneratedTextTransformation Outer;
public abstract Tables ReadSchema(__Regex TableFilterExclude__);
public abstract Tables ReadForeignKeys(Tables result);
protected void WriteLine(string o)
{
Outer.WriteLine(o);
}
}
And in class SqlServerSchemaReader implement it as
public override Tables ReadSchema(Regex TableFilterExclude)
{
var result = new Tables();
if(Cmd == null)
return result;
Cmd.CommandText = TableSQL;
Cmd.CommandTimeout = 300;
using(Cmd)
{
using(DbDataReader rdr = Cmd.ExecuteReader())
{
var rxClean = new Regex("^(event|Equals|GetHashCode|GetType|ToString|repo|Save|IsNew|Insert|Update|Delete|Exists|SingleOrDefault|Single|First|FirstOrDefault|Fetch|Page|Query)$");
var lastTable = string.Empty;
Table table = null;
while(rdr.Read())
{
string tableName = rdr["TableName"].ToString().Trim();
__if (TableFilterExclude != null && TableFilterExclude.IsMatch(tableName)) continue;__
Comments: Now fixed in v1.6.0
2) And if default of column equals (null) or some decimal value (0.5 for example), then in class constuctor we can see something like (see KoeffVed)
public DogParam()
{
SumMat = 0m;
SumVed = 0m;
SumPnr = 0m;
KoeffVed = m;
}
3) And my suggestion is change class SchemaReader (Add Regex to method ReadSchema)
private abstract class SchemaReader
{
protected readonly DbCommand Cmd;
protected SchemaReader(DbConnection connection, DbProviderFactory factory)
{
Cmd = factory.CreateCommand();
if(Cmd != null)
Cmd.Connection = connection;
}
public GeneratedTextTransformation Outer;
public abstract Tables ReadSchema(__Regex TableFilterExclude__);
public abstract Tables ReadForeignKeys(Tables result);
protected void WriteLine(string o)
{
Outer.WriteLine(o);
}
}
And in class SqlServerSchemaReader implement it as
public override Tables ReadSchema(Regex TableFilterExclude)
{
var result = new Tables();
if(Cmd == null)
return result;
Cmd.CommandText = TableSQL;
Cmd.CommandTimeout = 300;
using(Cmd)
{
using(DbDataReader rdr = Cmd.ExecuteReader())
{
var rxClean = new Regex("^(event|Equals|GetHashCode|GetType|ToString|repo|Save|IsNew|Insert|Update|Delete|Exists|SingleOrDefault|Single|First|FirstOrDefault|Fetch|Page|Query)$");
var lastTable = string.Empty;
Table table = null;
while(rdr.Read())
{
string tableName = rdr["TableName"].ToString().Trim();
__if (TableFilterExclude != null && TableFilterExclude.IsMatch(tableName)) continue;__
Comments: Now fixed in v1.6.0