Пример #1
0
 private object GetDatabaseTableFieldName(DataRow dataRow, string fieldName) => dataRow[MySQLDBStateless.GetDatabaseTableFieldName(this, fieldName)];
Пример #2
0
        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]);
            }
        }