public EntityTableProxy(EntityTable entityTable, IEntityTableSource entityTableSource = null) { LoadTable(entityTable, entityTableSource); }
virtual public void LoadTable(EntityTable EntityTable, IEntityTableSource entityTableSource) { SourceProvider = entityTableSource; Table = EntityTable; }
static public bool TryGetTable <TEntity>(this IEntityTableSource it, out EntityTableProxy <TEntity> tableProxy, string ns, string tableName, params string[] keys) { var selectCond = new EntityRelation(ns, tableName, keys); return(it.TryGetTable(selectCond, out tableProxy)); }
public EntityRowProxy(EntityRow row, IEntityTableSource sourceProvider) { Row = row; SourceProvider = sourceProvider; Row.PropertyChanged += new PropertyChangedEventHandler(OnFieldValueChanged); }
static public TEntity GetEntity <TEntity>(this EntityRow dataRow, IEntityTableSource entityTableSource = null) { return(dataRow.GenProxy <TEntity>(entityTableSource).Entity); }
static public EntityRowProxy <TEntity> GenProxy <TEntity>(this EntityRow dataRow, IEntityTableSource entityTableSource = null) { string proxyKey = typeof(EntityRowProxy <TEntity>).FullName; EntityRowProxy <TEntity> proxy; if (!dataRow.TryGetCache(proxyKey, out proxy)) { proxy = new EntityRowProxy <TEntity>(dataRow, entityTableSource); dataRow.AddCache(proxyKey, proxy); } return(proxy); }
static public EntityTableProxy <TEntity> GenProxy <TEntity>(this EntityTable table, IEntityTableSource entityTableSource = null) { return(new EntityTableProxy <TEntity>(table, entityTableSource)); }