mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	- 修复 FromQueryMulti 多表重载可能出现的 null 对象报错;(合并 FromQuery 和 FromQueryMulti 代码)
This commit is contained in:
		@@ -39,7 +39,7 @@ namespace FreeSql.Custom.SqlServer
 | 
			
		||||
                return (bool)param ? 1 : 0;
 | 
			
		||||
            else if (param is string)
 | 
			
		||||
            {
 | 
			
		||||
                if (mapColumn != null && mapColumn.CsType.NullableTypeOrThis() == typeof(string) && ncharDbTypes.Any(a => mapColumn.Attribute.DbType.Contains(a)) == false)
 | 
			
		||||
                if (mapColumn != null && mapColumn.CsType.NullableTypeOrThis() == typeof(string) && !string.IsNullOrWhiteSpace(mapColumn.Attribute.DbType) && ncharDbTypes.Any(a => mapColumn.Attribute.DbType.Contains(a)) == false)
 | 
			
		||||
                    return string.Concat("'", param.ToString().Replace("'", "''"), "'");
 | 
			
		||||
                return string.Concat("N'", param.ToString().Replace("'", "''"), "'");
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user