重构代码

重构代码
This commit is contained in:
chenchun
2022-04-02 17:44:50 +08:00
parent c6371ba72d
commit f5fb2ea17b
105 changed files with 1489 additions and 4654 deletions

View File

@@ -0,0 +1,31 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Repository
{
public interface IRepository<T> : ISimpleClient<T> where T : class, new()
{
public Task<T> InsertReturnEntityAsync(T entity);
public object CommonPage(QueryParameters pars, int pageIndex, int pageSize);
public object CommonPage(QueryParameters pars, int pageIndex, int pageSize, bool whereBool, Expression<Func<T, bool>> where);
public object CommonPageMapper<T2, TT>(Expression<Func<TT, ManyToMany>> expression, QueryParameters pars, int pageIndex, int pageSize, bool whereBool, Expression<Func<T, bool>> where);
public Task<T> FirstMapperAsync<T2, TT>(Expression<Func<TT, ManyToMany>> expression, bool isTenant = true);
public Task<List<T>> ToListMapperAsync<T2, TT>(Expression<Func<TT, ManyToMany>> expression, bool isTenant = true);
public Task<List<T>> ToListMapperAsync<T2, TT>(Expression<Func<TT, ManyToMany>> expression, bool whereBool, Expression<Func<T, bool>> where, bool isTenant = true);
public Task<List<T>> GetListAsync(Expression<Func<T, bool>> whereExpression, bool whereBool, Expression<Func<T, bool>> where, bool isTenant = true);
public Task<List<T>> GetListAsync(bool whereBool, Expression<Func<T, bool>> where, bool isTenant = true);
public Task<List<S>> StoreAsync<S>(string storeName, object para);
}
}