/// <inheritdoc />
        public string BuildSelectStatement <T>(T dataModel) where T : class
        {
            if (dataModel == null)
            {
                throw new ArgumentNullException(nameof(dataModel));
            }

            var dataModelTable   = dataModel.GetThuriaDataModelTableName();
            var dataModelColumns = dataModel.GetThuriaDataModelColumns(DbContextAction.Retrieve);
            var whereCondition   = GetWhereConditionsForDataModel(DbContextAction.Retrieve, dataModel);

            string sqlStatement;

            lock (_selectBuilderLock)
            {
                _selectStatementBuilder.Clear();
                _selectStatementBuilder = _selectStatementBuilder.WithTable(dataModelTable);

                foreach (var currentColumn in dataModelColumns)
                {
                    var columnModel = new ColumnModel(dataModelTable, currentColumn.ColumnName, currentColumn.Alias);
                    _selectStatementBuilder.WithColumn(columnModel);
                }

                if (!string.IsNullOrWhiteSpace(whereCondition))
                {
                    _selectStatementBuilder.WithWhereCondition(whereCondition);
                }

                sqlStatement = _selectStatementBuilder.Build();
            }

            return(sqlStatement);
        }
        private string ConstructSelectStatement(object dataModel)
        {
            var dataModelTable   = dataModel.GetThuriaDataModelTableName();
            var dataModelColumns = dataModel.GetThuriaDataModelColumns(TharkAction.Retrieve);
            var whereCondition   = GetWhereConditionsForDataModel(TharkAction.Retrieve, dataModel);

            var selectStatementBuilder = _selectStatementBuilder.WithTable(dataModelTable);

            foreach (var currentColumn in dataModelColumns)
            {
                var columnModel = new ColumnModel(dataModelTable, currentColumn.ColumnName, currentColumn.Alias);
                selectStatementBuilder.WithColumn(columnModel);
            }

            if (!string.IsNullOrWhiteSpace(whereCondition))
            {
                selectStatementBuilder.WithWhereCondition(whereCondition);
            }

            return(selectStatementBuilder.Build());
        }