public NovaEntity(NovaTable table, SqlDataReader reader) { _table = table; _identity = table.Identity; _exists = true; int fieldcount = reader.FieldCount; for (int i = 0; i < fieldcount; i++) { object val = reader[i]; if (val == DBNull.Value) { val = null; } _data.Add( new NovaField { Name = reader.GetName(i), Value = val, Edited = false }); if (reader.GetName(i) == _identity) { _id = val; } } }
public NovaQuery(INovaDb db, NovaTable table, string tableName, string action, string identity = null) { _db = db; _table = table; _tableName = tableName; _action = action; _identity = identity; }
public NovaQuery(INovaDb db, NovaTable table, INovaQuery tableQuery, string action, string identity = null) { _db = db; _table = table; _tableName = tableQuery.BuildString(); _queryTable = true; _action = action; _identity = identity; }
public NovaEntity(NovaTable table) { _table = table; _identity = table.Identity; }