mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 增加 ISelect ToDelete/ToUpdate 方法,实现更复杂的删除/更新操作;
This commit is contained in:
		@@ -62,7 +62,11 @@ namespace FreeSql.SqlServer
 | 
			
		||||
            var sb = new StringBuilder();
 | 
			
		||||
            var news = new string[objs.Length];
 | 
			
		||||
            for (var a = 0; a < objs.Length; a++)
 | 
			
		||||
                news[a] = types[a] == typeof(string) ? objs[a] : $"cast({objs[a]} as nvarchar)";
 | 
			
		||||
            {
 | 
			
		||||
                if (types[a] == typeof(string)) news[a] = objs[a];
 | 
			
		||||
                else if (types[a].NullableTypeOrThis() == typeof(Guid)) news[a] = $"cast({objs[a]} as char(36))";
 | 
			
		||||
                else news[a] = $"cast({objs[a]} as nvarchar)";
 | 
			
		||||
            }
 | 
			
		||||
            return string.Join(" + ", news);
 | 
			
		||||
        }
 | 
			
		||||
        public override string Mod(string left, string right, Type leftType, Type rightType) => $"{left} % {right}";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user