| | |
| | | using SqlSugar; |
| | | using Microsoft.Data.SqlClient; |
| | | using SqlSugar; |
| | | using System.Data; |
| | | using System.Linq.Expressions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Reflection; |
| | | using WIDESEA_Core.Helper; |
| | | using Microsoft.Data.SqlClient; |
| | | using System.Drawing.Printing; |
| | | using WIDESEA_Core.Tenants; |
| | | using WIDESEA_Core.Seed; |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_Core.AOP; |
| | | using OfficeOpenXml.FormulaParsing.ExpressionGraph; |
| | | using WIDESEA_Core.DB.Models; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Utilities; |
| | | using Microsoft.AspNetCore.Mvc.RazorPages; |
| | | using NetTaste; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Core.BaseRepository |
| | | { |
| | |
| | | return db; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建数据库连接对象 |
| | | /// </summary> |
| | |
| | | } |
| | | if (list.Count > 0) |
| | | _db.InsertableByObject(list).AS(type.Name + "_Hty").ExecuteCommand(); |
| | | |
| | | } |
| | | } |
| | | return DeleteData(entities); |
| | | } |
| | | |
| | | public Task<int> GetTaskNo() |
| | | public async Task<int> GetTaskNo() |
| | | { |
| | | string sql = "select next value for dbo.GetTaskNum"; |
| | | return Db.Ado.SqlQuerySingleAsync<int>(sql); |
| | | return await Db.Ado.SqlQuerySingleAsync<int>(sql); |
| | | } |
| | | |
| | | public virtual async Task<List<TEntity>> QueryDataNavAsync(Expression<Func<TEntity, bool>> whereExpression) |
| | | { |
| | | return await _db.Queryable<TEntity>().IncludesAllFirstLayer().ToListAsync(); |
| | | } |
| | | |
| | | public virtual async Task<TEntity> QueryDataNavFirstAsync(Expression<Func<TEntity, bool>> whereExpression) |
| | | { |
| | | return await _db.Queryable<TEntity>().IncludesAllFirstLayer().FirstAsync(); |
| | | } |
| | | |
| | | //List<TResult> QueryMuch<T, T2, T3, TResult>( |
| | | // Expression<Func<T, T2, T3, object[]>> joinExpression, |
| | | // Expression<Func<T, T2, T3, TResult>> selectExpression, |