dotnetcore / SmartSql

SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
https://smartsql.net/
Apache License 2.0
1.1k stars 222 forks source link

强制传参对象匹配后不能为null #50

Closed xuanhuangkeji closed 5 years ago

xuanhuangkeji commented 5 years ago

比如在批量删除场景下,我们需要多条件删除,如果传参对象在QueryParams均未匹配到,那么将会直接把整个表给清空

Delete From test

_testService.Delete(new{xxid=1});

如果xxid没有在QueryParams中匹配到,test表里面的数据将全部被删除

Ahoo-Wang commented 5 years ago

https://github.com/Smart-Kit/SmartSql/commit/15121ee32e988726a6810386da1c045bfc1b95a4