添加项目文件。

This commit is contained in:
liming 蔡
2026-07-14 13:55:17 +08:00
parent 63759495f2
commit 8bbdf78731
335 changed files with 81415 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace JY.DAL.Repository
{
public interface IRepository<T> where T : class, new()
{
ISqlSugarClient Db { get; }
T GetById(object id);
T GetSingle(Expression<Func<T, bool>> predicate);
List<T> GetList();
List<T> GetList(Expression<Func<T, bool>> predicate);
List<T> GetListPaged(int pageIndex, int pageSize, out int totalCount, Expression<Func<T, bool>> predicate = null, string orderBy = null);
int Insert(T entity);
int Insert(List<T> entities);
int Update(T entity);
int Update(T entity, Expression<Func<T, bool>> whereExpression);
int Update(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression);
int Delete(object id);
int Delete(Expression<Func<T, bool>> predicate);
int Delete(List<T> entities);
bool Any(Expression<Func<T, bool>> predicate);
int Count(Expression<Func<T, bool>> predicate = null);
}
}