将Feature/XP.Common和Feature/XP.Hardware分支合并至Develop/XP.forHardwareAndCommon,完善XPapp注册和相关硬件类库通用类库功能。

This commit is contained in:
QI Mingxuan
2026-04-16 17:31:13 +08:00
parent 6ec4c3ddaa
commit 2bd6e566c3
581 changed files with 74600 additions and 222 deletions
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XP.Common.Database.Interfaces;
namespace XP.Common.Database.Implementations
{
/// <summary>
/// 数据库操作执行结果实体
/// </summary>
public class DbExecuteResult : IDbExecuteResult
{
public bool IsSuccess { get; set; }
public int RowsAffected { get; set; }
public string Message { get; set; } = string.Empty;
public Exception? Exception { get; set; }
/// <summary>
/// 快速创建成功结果
/// </summary>
public static DbExecuteResult Success(string message = "执行成功", int rowsAffected = 0)
{
return new DbExecuteResult
{
IsSuccess = true,
Message = message,
RowsAffected = rowsAffected
};
}
/// <summary>
/// 快速创建失败结果
/// </summary>
public static DbExecuteResult Fail(string message, Exception? ex = null, int rowsAffected = 0)
{
return new DbExecuteResult
{
IsSuccess = false,
Message = message,
Exception = ex,
RowsAffected = rowsAffected
};
}
}
}