2022-04-02 17:44:50 +08:00
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2022-04-06 22:22:45 +08:00
|
|
|
|
using Yi.Framework.Common.Models;
|
2022-04-08 18:23:37 +08:00
|
|
|
|
using Yi.Framework.Model.Models;
|
2022-04-06 18:05:00 +08:00
|
|
|
|
using Yi.Framework.Model.Query;
|
2022-04-02 17:44:50 +08:00
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.Repository
|
|
|
|
|
|
{
|
2022-04-24 16:44:16 +08:00
|
|
|
|
public interface IRepository<T> : ISimpleClient<T> where T : class, IBaseModelEntity, new()
|
2022-04-02 17:44:50 +08:00
|
|
|
|
{
|
2022-04-12 18:09:13 +08:00
|
|
|
|
public ISqlSugarClient _Db { get; set; }
|
2022-04-13 21:36:50 +08:00
|
|
|
|
public Task<bool> UseTranAsync(Func<Task> func);
|
2022-04-02 17:44:50 +08:00
|
|
|
|
public Task<T> InsertReturnEntityAsync(T entity);
|
|
|
|
|
|
public Task<List<S>> StoreAsync<S>(string storeName, object para);
|
2022-04-10 22:56:45 +08:00
|
|
|
|
public Task<PageModel<List<T>>> CommonPageAsync(QueryPageCondition pars);
|
2022-04-08 23:44:25 +08:00
|
|
|
|
public Task<List<T>> GetListAsync(QueryCondition pars);
|
2022-04-10 22:56:45 +08:00
|
|
|
|
public Task<bool> DeleteByLogicAsync(List<long> ids);
|
|
|
|
|
|
public Task<bool> UpdateIgnoreNullAsync(T entity);
|
2022-04-14 20:44:28 +08:00
|
|
|
|
public Task<List<S>> UseSqlAsync<S>(string sql);
|
|
|
|
|
|
public Task<bool> UseSqlAsync(string sql);
|
|
|
|
|
|
|
2022-04-02 17:44:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|