コード例 #1
0
 /**
  * Find column name of generated key.
  *
  * @param logicTableName logic table name
  * @return column name of generated key
  */
 public string FindGenerateKeyColumnName(string logicTableName)
 {
     return(TableRules
            .Where(o => o.LogicTable.EqualsIgnoreCase(logicTableName) && o.GetGenerateKeyColumn() != null)
            .Select(o => o.GetGenerateKeyColumn()).FirstOrDefault());
 }
コード例 #2
0
 /**
  * Get logic table names based on actual table name.
  *
  * @param actualTableName actual table name
  * @return logic table name
  */
 public ICollection <string> GetLogicTableNames(string actualTableName)
 {
     return(TableRules.Where(o => o.IsExisted(actualTableName)).Select(o => o.LogicTable).ToList());
 }
コード例 #3
0
 /**
  * Find table rule via actual table name.
  *
  * @param actualTableName actual table name
  * @return table rule
  */
 public TableRule FindTableRuleByActualTable(string actualTableName)
 {
     return(TableRules.Where(o => o.IsExisted(actualTableName)).FirstOrDefault());
 }