Security/Yuebon.Security.Repositories/LogRepository.cs
(完整代码) 844Bnamespace Yuebon.Security.Repositories
{
/// <summary>
/// 日志仓储实现
/// </summary>
public class LogRepository : BaseRepository<Log>, ILogRepository
{
public LogRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
public override int Insert(Log entity)
{
if (entity.KeyIsNull())
{
entity.GenerateDefaultKeyVal();
}
return Db.Insertable(entity).ExecuteCommand();
}
/// <summary>
/// 物理删除信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public override bool Delete(object id)
{
int row = Db.Ado.ExecuteCommand($"delete from Sys_Log where Id=@id");
return row > 0 ? true : false;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。