SqlHelperQueryT(Guid) Method
主鍵查詢
Namespace: eBizprise.FrameworkAssembly: eBizprise.Framework.Database.SqlHelper (in eBizprise.Framework.Database.SqlHelper.dll) Version: 25.0.2.0+adf38c4ccb2bf98d8ad258a6278302b5e05a94ed
public DatabaseResult<T> Query<T>(
params Guid[] primaryKeys
)
- primaryKeys Guid
- 識別碼
- T
- 物件類型
DatabaseResultTDatabaseResult<T>
IDatabaseHelperQueryT(Guid) using (SqlHelper sqlHelper = new SqlHelper("SqlServer"))
{
DatabaseResult<Employee> result = sqlHelper.Query<Employee>(new Guid("92347F15-8355-46A2-B5DD-C17000884595"));
if (result.IsSuccess) {
Employee employee = result.Result;
//Do something
} else {
Exception exception = result.Exception;
//Error handling
}
}
| Date | Version | Description |
|---|
| 2020/02/07 | 1.0.0.0 | 初版 |
| 2020/02/19 | 1.0.0.1 | 調整回傳格式包含執行成功與否以及異常訊息 |
| 2020/03/06 | 1.0.2.0 | 增加支援結構描述 |
| 2020/09/01 | 1.0.18.0 | 增加Log明細 |
| 2025/07/29 | 2.2.6.0 | 移除自訂屬性,DataAnnotations通用屬性 |
| 2025/08/08 | 1.0.1.0 | 修正含ExtendJson資料查詢會變空值問題 |
| 2025/09/19 | 25.0.0.0 | 彙整2025年度初版 |