From 319e8729b47c96e3a3717c5a40cd5df867d65ce5 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 13 九月 2024 17:25:20 +0800
Subject: [PATCH] 最新代码提交
---
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs
index 539c96b..38320d9 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs
@@ -15,6 +15,9 @@
using WIDESEA_Core.DB;
using WIDESEA_Core.Const;
using WIDESEA_Core.AOP;
+using AngleSharp.Dom;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
+using SharpCompress.Common;
namespace WIDESEA_Core.BaseRepository
{
@@ -33,7 +36,7 @@
var mta = typeof(TEntity).GetCustomAttribute<MultiTenantAttribute>();
if (mta is { TenantType: TenantTypeEnum.Db })
{
- //鑾峰彇绉熸埛淇℃伅 绉熸埛淇℃伅鍙互鎻愬墠缂撳瓨涓嬫潵
+ //鑾峰彇绉熸埛淇℃伅 绉熸埛淇℃伅鍙互鎻愬墠缂撳瓨涓嬫潵
if (App.User is { TenantId: > 0 })
{
dynamic tenant = db.Queryable(MainDb.TenantTableName, "x").Where(MainDb.TenantId, "=", App.User.TenantId).First();
@@ -586,7 +589,6 @@
// Expression<Func<T, T2, T3, bool>> whereLambda = null) where T : class, new(){throw new NotImplementedException();}
//Task<PageModel<TEntity>> QueryPage(PaginationModel pagination){throw new NotImplementedException();}
-
public Task<TEntity> QureyDataByIdAsync(object id)
{
return _db.Queryable<TEntity>().In(id).SingleAsync();
@@ -606,6 +608,16 @@
{
IInsertable<TEntity> insert = _db.Insertable(entity);
return insert.ExecuteReturnIdentityAsync();
+ }
+
+ /// <summary>
+ /// 瀵艰埅鎻掑叆鏁版嵁(鍙敮鎸�2绾�)
+ /// </summary>
+ /// <param name="Entity"></param>
+ /// <returns></returns>
+ public async Task<bool> AddDataNavAsync(TEntity Entity)
+ {
+ return await _db.InsertNav(Entity).IncludesAllFirstLayer().ExecuteCommandAsync();
}
public Task<int> AddDataAsync(List<TEntity> listEntity)
@@ -679,6 +691,11 @@
public Task<TEntity> QueryFirstAsync(Expression<Func<TEntity, bool>> whereExpression)
{
return _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).FirstAsync();
+ }
+
+ public Task<TEntity> QueryFirstNavAsync(Expression<Func<TEntity, bool>> whereExpression)
+ {
+ return _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).IncludesAllFirstLayer().FirstAsync();
}
public Task<TResult> QueryFirstAsync<TResult>(Expression<Func<TEntity, bool>> whereExpression, Expression<Func<TEntity, TResult>> expression)
@@ -867,4 +884,4 @@
// Expression<Func<T, T2, T3, bool>> whereLambda = null) where T : class, new(){throw new NotImplementedException();}
//Task<PageModel<TEntity>> QueryPage(PaginationModel pagination){throw new NotImplementedException();}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3