Example #1
0
 private void InitSqlMapStatementMap(SmartSqlMap sqlmap)
 {
     foreach (var statementKV in sqlmap.Statements)
     {
         var statement = statementKV.Value;
         if (MappedStatement.ContainsKey(statement.FullSqlId))
         {
             throw new SmartSqlException($"SmartSqlMapConfig Load MappedStatements: StatementId:{statement.FullSqlId}  already exists!");
         }
         MappedStatement.Add(statement.FullSqlId, statement);
     }
 }
Example #2
0
 private void InitSqlMapStatementMap(SmartSqlMap sqlmap)
 {
     foreach (var statement in sqlmap.Statements)
     {
         if (MappedStatement.ContainsKey(statement.FullSqlId))
         {
             MappedStatement.Remove(statement.FullSqlId);
             if (_logger.IsEnabled(LogLevel.Warning))
             {
                 _logger.LogWarning($"SmartSqlMapConfig Load MappedStatements: StatementId:{statement.FullSqlId}  already exists!");
             }
         }
         MappedStatement.Add(statement.FullSqlId, statement);
     }
 }