dapper--中使用类似whereif语句

WHERE (@CategoryId IS NULL OR CategoryId = @CategoryId)

类似于

WhereIf(!string.IsNullOrEmpty(a), A = a);
posted @ 2021-12-02 22:28  lishidefengchen  阅读(81)  评论(0编辑  收藏  举报