using CmsQueryExtensions.Extension; using System.Linq.Expressions; using Volo.Abp.Domain.Repositories; namespace CMS.Plugin.$NameSpacePath$.Domain.$EntityName$; /// /// $ChinaComment$仓储 /// public interface I$EntityName$Repository : IBasicRepository<$EntityName$, Guid> { /// /// 按照名称查找$ChinaComment$ /// /// /// /// Task<$EntityName$> FindByNameAsync(string name, CancellationToken cancellationToken = default); /// /// 验证名称是否存在$ChinaComment$ /// /// /// /// Task NameExistAsync(string name, Guid? id = null); /// /// 获取最大排序$ChinaComment$ /// /// Task GetMaxSortAsync(); /// /// 获取分页列表$ChinaComment$ /// /// /// /// /// /// /// /// Task> GetListAsync(FunReturnResultModel>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default); /// /// 获取总数$ChinaComment$ /// /// /// /// Task GetCountAsync(FunReturnResultModel>> whereConditions, CancellationToken cancellationToken = default); /// /// 物理删除$ChinaComment$ /// /// 主键ID /// /// Task DeletePermanentlyAsync(Guid id, CancellationToken cancellationToken = default); /// /// 批量物理删除$ChinaComment$(直接删除,不软删除) /// /// 要删除的主键ID列表 /// /// Task BatchDeletePermanentlyAsync(IEnumerable ids, CancellationToken cancellationToken = default); /// /// 根据条件获取$ChinaComment$列表 /// /// /// /// Task> GetListByFilterAsync(Expression> whereConditions, CancellationToken cancellationToken = default); /// /// 根据条件获取单个$ChinaComment$ /// /// /// 是否查询出多条就报错 /// /// /// Task<$EntityName$> GetSingleByFilterAsync(Expression> whereConditions, bool is​MultipleThrowException = false, CancellationToken cancellationToken = default); }