anjoy8 / Blog.Core

💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
http://apk.neters.club/.doc
Apache License 2.0
5.06k stars 1.38k forks source link

在BlogController的delete方法调用 await _blogArticleServices.DeleteById(id); 返回错误 #272

Closed weiguang3100 closed 2 years ago

weiguang3100 commented 2 years ago

在BlogController的delete方法调用 await _blogArticleServices.DeleteById(id); 返回如下错误

The type 'int' must be a reference type in order to use it as parameter 'T' in the generic type or method 'SqlSugar.SqlSugarClient.Deleteable(T)'

weiguang3100 commented 2 years ago

我目前升级一下sqlsugar可以了,或者不升级换一下方法 public async Task<bool> DeleteById(object id) { return await _db.Deleteable<TEntity>().In(id).ExecuteCommandHasChangeAsync(); }

anjoy8 commented 2 years ago

很好,可以帮忙提交个PR,为社区做贡献。

weiguang3100 commented 2 years ago

很好,可以帮忙提交个PR,为社区做贡献。

已提交