private object GetDatabaseTableFieldName(DataRow dataRow, string fieldName) => dataRow[MySQLDBStateless.GetDatabaseTableFieldName(this, fieldName)];
public UserModel(int id) : base(MySqlConnectionString.ConnectionString) { DataTable DataTable = _MySQLDBStateless.ExecDataTable($"SELECT * FROM {this.TableName()} WHERE {MySQLDBStateless.GetDatabaseTableFieldName(this, nameof(this.ID))} = {MySQLDBCommon.SetValueForSql(id)}"); if (DataTable.Rows.Count == 1) { LoadByUserModelDataRow(DataTable.Rows[0]); } }